Fix IRQ numbers
The raw enum values are not always equal to the interrupt number fixes #23
This commit is contained in:
parent
4e789c663c
commit
9f9d808948
@ -115,7 +115,9 @@ pub fn interrupt_declare(item: TokenStream) -> TokenStream {
|
||||
unsafe impl OwnedInterrupt for #name_interrupt {
|
||||
type Priority = Priority;
|
||||
fn number(&self) -> u8 {
|
||||
Interrupt::#name as u8
|
||||
use cortex_m::interrupt::Nr;
|
||||
let irq = Interrupt::#name;
|
||||
irq.nr() as u8
|
||||
}
|
||||
unsafe fn __handler(&self) -> &'static ::embassy::interrupt::Handler {
|
||||
#[export_name = #name_handler]
|
||||
|
Loading…
Reference in New Issue
Block a user