Skip to content

Commit fcc4104

Browse files
committed
Skip bitfields with non-uppercase names
1 parent 04dfd74 commit fcc4104

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core_generator/src/gen.rs

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ pub fn write_registers(mcu: &Mcu, w: &mut dyn Write) -> Result<(), io::Error> {
3939

4040
writeln!(w, "impl {} {{", register.name)?;
4141
for bitfield in register.bitfields.iter() {
42+
if !(bitfield.name.chars().all(|c| char::is_uppercase(c) || char::is_numeric(c))) { continue }
43+
4244
// Create a mask for the whole bitset.
4345
writeln!(w, " pub const {}: RegisterBits<Self> = RegisterBits::new(0x{:x});", bitfield.name, bitfield.mask)?;
4446

0 commit comments

Comments
 (0)