Skip to content

Commit d89e1f4

Browse files
committed
Switched to UPPER_CASE for unions
PascalCase doesn't work when we have registers named `FOO_11` and `FOO1_1`. This happened in * Freescale MKL81Z7 * Freescale MKL82Z7 * Freescale MK81F25615 * Freescale MK82F25615 on `LTC0_PK*` registers.
1 parent 755c951 commit d89e1f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/generate/peripheral.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ fn register_or_cluster_block_nightly(
490490
if region.fields.len() > 1 && !block_is_union {
491491
let (type_name, name) = match region.ident.clone() {
492492
Some(prefix) => {
493-
(Ident::new(format!("{}Union", prefix.to_sanitized_pascal_case())),
493+
(Ident::new(format!("{}Union", prefix.to_sanitized_upper_case())),
494494
Ident::new(prefix))
495495
}
496496
// If we can't find a name, fall back to the region index as a

0 commit comments

Comments
 (0)