diff options
Diffstat (limited to 'embassy-stm32/build.rs')
| -rw-r--r-- | embassy-stm32/build.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/embassy-stm32/build.rs b/embassy-stm32/build.rs index 730c78f5e..9e597f187 100644 --- a/embassy-stm32/build.rs +++ b/embassy-stm32/build.rs | |||
| @@ -160,13 +160,11 @@ fn main() { | |||
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | g.extend(quote! { | 162 | g.extend(quote! { |
| 163 | pub mod interrupt { | 163 | embassy_hal_common::interrupt_mod!( |
| 164 | use crate::pac::Interrupt as InterruptEnum; | ||
| 165 | use embassy_cortex_m::interrupt::_export::declare; | ||
| 166 | #( | 164 | #( |
| 167 | declare!(#irqs); | 165 | #irqs, |
| 168 | )* | 166 | )* |
| 169 | } | 167 | ); |
| 170 | }); | 168 | }); |
| 171 | 169 | ||
| 172 | // ======== | 170 | // ======== |
| @@ -297,6 +295,7 @@ fn main() { | |||
| 297 | let channels = channels.iter().map(|(_, dma, ch)| format_ident!("{}_{}", dma, ch)); | 295 | let channels = channels.iter().map(|(_, dma, ch)| format_ident!("{}_{}", dma, ch)); |
| 298 | 296 | ||
| 299 | g.extend(quote! { | 297 | g.extend(quote! { |
| 298 | #[cfg(feature = "rt")] | ||
| 300 | #[crate::interrupt] | 299 | #[crate::interrupt] |
| 301 | unsafe fn #irq () { | 300 | unsafe fn #irq () { |
| 302 | #( | 301 | #( |
