rust: io: fix example in register! macro

In this example, an u32 register is split in two u8 in big-endian order,
but the high byte is actually defined as taking nine bits instead of
eight.

This is completely inconsequential, as I expect most users will just
copy the bit ranges from their datasheets, but it doesn’t hurt to fix
that typo.

Signed-off-by: Link Mauve <linkmauve@linkmauve.fr>
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260701160357.29031-1-linkmauve@linkmauve.fr
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
This commit is contained in:
Link Mauve 2026-07-01 18:03:54 +02:00 committed by Danilo Krummrich
parent 0fa8e47dea
commit 5dcef303b2

View File

@ -448,7 +448,7 @@ fn into_io_op(self) -> (FixedRegisterLoc<T>, T) {
///
/// register! {
/// FIXED_REG(u32) @ 0x100 {
/// 16:8 high_byte;
/// 15:8 high_byte;
/// 7:0 low_byte;
/// }
/// }