Skip to content

Commit 5ccff19

Browse files
committed
Fix typo and pascal case
1 parent fbc0bb5 commit 5ccff19

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/generate/peripheral.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use svd::{Cluster, ClusterInfo, Defaults, Peripheral, Register};
77
use syn::{self, Ident};
88

99
use errors::*;
10-
use util::{self, ToSanitizedSnakeCase, ToSanitizedUpperCase, BITS_PER_BYTE};
10+
use util::{self, ToSanitizedPascalCase, ToSanitizedSnakeCase, ToSanitizedUpperCase, BITS_PER_BYTE};
1111

1212
use generate::register;
1313

@@ -316,10 +316,10 @@ fn register_or_cluster_block(
316316
if region.fields.len() > 1 && !block_is_union {
317317
let (type_name, name) = match region.shortest_ident() {
318318
Some(prefix) => {
319-
(Ident::new(format!("{}Union", prefix.to_sanitized_upper_case())),
319+
(Ident::new(format!("{}Union", prefix.to_sanitized_pascal_case())),
320320
Ident::new(prefix))
321321
}
322-
// If we can't find a name, fall back to theregion index as a
322+
// If we can't find a name, fall back to the region index as a
323323
// unique-within-this-block identifier counter.
324324
None => {
325325
let ident = Ident::new(format!("U{}", i));

0 commit comments

Comments
 (0)