Skip to content

Commit ac5be9a

Browse files
committed
Update tock-registers doc to fix mistake
Default is u32, and register fields in the example were greater than 8 bits in size, so we should just use 32-bits as the register size in the example.
1 parent aed4a80 commit ac5be9a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

libraries/tock-register-interface/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,8 @@ Bitfields are defined through the `register_bitfields!` macro:
166166

167167
```rust
168168
register_bitfields! [
169-
// First parameter is the register width for the bitfields. Can be u8, u16,
170-
// u32, or u64.
171-
u8,
169+
// First parameter is the register width. Can be u8, u16, u32, or u64.
170+
u32,
172171

173172
// Each subsequent parameter is a register abbreviation, its descriptive
174173
// name, and its associated bitfields.

0 commit comments

Comments
 (0)