We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d45db6 commit 566f7c7Copy full SHA for 566f7c7
src/generate/peripheral.rs
@@ -323,7 +323,7 @@ impl FieldRegions {
323
let mut indices = Vec::new();
324
325
let field_start = field.offset;
326
- let field_end = field_start + (( field.size as f32 ) / (BITS_PER_BYTE as f32)).ceil() as u32;
+ let field_end = field_start + (field.size + BITS_PER_BYTE - 1) / BITS_PER_BYTE;
327
328
// The region that we're going to insert
329
let mut new_region = Region {
0 commit comments