Re: [PATCH v2 4/5] rust: io: add `register!` macro
From: Alexandre Courbot
Date: Sun Jan 25 2026 - 22:25:24 EST
On Wed Jan 21, 2026 at 11:15 PM JST, Gary Guo wrote:
> On Wed Jan 21, 2026 at 7:23 AM GMT, Alexandre Courbot wrote:
>> Add a macro for defining hardware register types with I/O accessors.
>>
>> Each register field is represented as a `Bounded` of the appropriate bit
>> width, ensuring field values are never silently truncated.
>>
>> Fields can optionally be converted to/from custom types, either fallibly
>> or infallibly.
>>
>> The address of registers can be direct, relative, or indexed, supporting
>> most of the patterns in which registers are arranged.
>>
>> Signed-off-by: Alexandre Courbot <acourbot@xxxxxxxxxx>
>
> It looks like this is still based on the current Io impl. I think with Zhi's new
> Io trait this will look quite different.
Correct. The next version will be rebased on top of it now that it is
merged into `driver-core-next`.