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(
6161 let ercs = p. registers . as_ref ( ) . map ( |x| x. as_ref ( ) ) . unwrap_or ( & [ ] [ ..] ) ;
6262
6363 let registers: & [ & Register ] = & util:: only_registers ( & ercs) [ ..] ;
64+ let clusters = util:: only_clusters ( ercs) ;
6465
6566 // No `struct RegisterBlock` can be generated
66- if registers. is_empty ( ) {
67+ if registers. is_empty ( ) && clusters . is_empty ( ) {
6768 // Drop the `#name_pc` definition of the peripheral
6869 out. pop ( ) ;
6970 return Ok ( out) ;
@@ -73,7 +74,6 @@ pub fn render(
7374 mod_items. push ( register_or_cluster_block ( ercs, defaults, None ) ?) ;
7475
7576 // Push all cluster related information into the peripheral module.
76- let clusters = util:: only_clusters ( ercs) ;
7777 for c in & clusters {
7878 mod_items. push ( cluster_block ( c, defaults, p, all_peripherals) ?) ;
7979 }
You can’t perform that action at this time.
0 commit comments