File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
14
14
15
15
- Provide an associated const ptr ` PTR ` per peripheral RegisterBlock
16
16
17
+ - Generated peripherals now implement ` core::fmt::Debug ` .
18
+
17
19
### Fixed
18
20
19
21
- Keyword sanitizing (` async ` )
Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ pub fn render(
40
40
}
41
41
42
42
let span = Span :: call_site ( ) ;
43
- let name_pc = Ident :: new ( & p. name . to_sanitized_upper_case ( ) , span) ;
43
+ let name_str = p. name . to_sanitized_upper_case ( ) ;
44
+ let name_pc = Ident :: new ( & name_str, span) ;
44
45
let address = util:: hex ( p. base_address as u64 ) ;
45
46
let description = util:: respace ( p. description . as_ref ( ) . unwrap_or ( & p. name ) ) ;
46
47
@@ -77,6 +78,12 @@ pub fn render(
77
78
unsafe { & * Self :: PTR }
78
79
}
79
80
}
81
+
82
+ impl core:: fmt:: Debug for #name_pc {
83
+ fn fmt( & self , f: & mut core:: fmt:: Formatter ) -> core:: fmt:: Result {
84
+ f. debug_struct( #name_str) . finish( )
85
+ }
86
+ }
80
87
} ) ;
81
88
82
89
// Derived peripherals may not require re-implementation, and will instead
You can’t perform that action at this time.
0 commit comments