File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,10 @@ pub fn render(
61
61
let ercs = p. registers . as_ref ( ) . map ( |x| x. as_ref ( ) ) . unwrap_or ( & [ ] [ ..] ) ;
62
62
63
63
let registers: & [ & Register ] = & util:: only_registers ( & ercs) [ ..] ;
64
+ let clusters = util:: only_clusters ( ercs) ;
64
65
65
66
// No `struct RegisterBlock` can be generated
66
- if registers. is_empty ( ) {
67
+ if registers. is_empty ( ) && clusters . is_empty ( ) {
67
68
// Drop the `#name_pc` definition of the peripheral
68
69
out. pop ( ) ;
69
70
return Ok ( out) ;
@@ -73,7 +74,6 @@ pub fn render(
73
74
mod_items. push ( register_or_cluster_block ( ercs, defaults, None ) ?) ;
74
75
75
76
// Push all cluster related information into the peripheral module.
76
- let clusters = util:: only_clusters ( ercs) ;
77
77
for c in & clusters {
78
78
mod_items. push ( cluster_block ( c, defaults, p, all_peripherals) ?) ;
79
79
}
You can’t perform that action at this time.
0 commit comments