Do not emit `mod interrupt` if there aren't any defined.
Or else the resulting file will not compile.
Fixes
@@ -219,6 +219,7 @@ pub fn interrupt(peripherals: &[Peripheral], items: &mut Vec<Tokens>) {
},
);
+ if interrupts.len() > 0 {
items.push(
quote! {
/// Interrupts
@@ -228,6 +229,7 @@ pub fn interrupt(peripherals: &[Peripheral], items: &mut Vec<Tokens>) {
},
);
}
+}
pub fn peripheral(
p: &Peripheral,
