Re: [PATCH v2 4/5] rust: io: add `register!` macro

From: John Hubbard

Date: Sun Jan 25 2026 - 23:31:58 EST


On 1/21/26 8:15 AM, Miguel Ojeda wrote:
On Wed, Jan 21, 2026 at 3:58 PM Gary Guo <gary@xxxxxxxxxxx> wrote:

Another top-level question I have is whether we should define multiple registers
(perhaps all) in one macro invocation. That's the strategy of `tock-registers`
crate which is widely used in embedded Rust.

Yeah, I suggested a multi-register one for something similar in 2021
and even tackling extra automatic codegen there, like e.g. adjusting
the value as needed to get to the proper unit from a sensor.

Not sure how useful the multi-register part in practice it would be,
but it would allow to relate several registers together if needed (is
that even common nowadays?). Or perhaps things like the

For the NVIDIA GPU drivers, maybe not. Just a data point.


thanks,
--
John Hubbard