We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d802c58 commit 59d30a4Copy full SHA for 59d30a4
cortex-m-rt/macros/src/lib.rs
@@ -227,7 +227,7 @@ pub fn exception(args: TokenStream, input: TokenStream) -> TokenStream {
227
228
const SCB_ICSR: *const u32 = 0xE000_ED04 as *const u32;
229
230
- let irqn = unsafe { core::ptr::read_volatile(SCB_ICSR) as u8 as i16 - 16 };
+ let irqn = unsafe { (core::ptr::read_volatile(SCB_ICSR) & 0x1FF) as i16 - 16 };
231
232
#ident(irqn)
233
}
0 commit comments