stm32: change interrupt declarations from macrotables to build.rs.
This commit is contained in:
@ -84,6 +84,23 @@ fn main() {
|
||||
embassy_hal_common::peripherals!(#(#singleton_tokens),*);
|
||||
});
|
||||
|
||||
// ========
|
||||
// Generate interrupt declarations
|
||||
|
||||
let mut irqs = Vec::new();
|
||||
for irq in METADATA.interrupts {
|
||||
irqs.push(format_ident!("{}", irq.name));
|
||||
}
|
||||
|
||||
g.extend(quote! {
|
||||
pub mod interrupt {
|
||||
use crate::pac::Interrupt as InterruptEnum;
|
||||
#(
|
||||
embassy::interrupt::declare!(#irqs);
|
||||
)*
|
||||
}
|
||||
});
|
||||
|
||||
// ========
|
||||
// Generate DMA IRQs.
|
||||
|
||||
|
Reference in New Issue
Block a user