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 213d5e0 commit 53e64aeCopy full SHA for 53e64ae
src/interrupts/mod.rs
@@ -30,15 +30,13 @@ pub mod primask_mutex;
30
31
#[exception]
32
fn DefaultHandler(irqn: i16) {
33
- if irqn < 16 {
+ if irqn < 0 {
34
panic!("Unhandled exception (IRQn = {})", irqn);
35
} else {
36
- // irqs 0-15 are exceptions
37
- let interrupt_number = irqn - 16;
38
unsafe {
39
- match ISRS[usize::try_from(interrupt_number).unwrap()] {
+ match ISRS[usize::try_from(irqn).unwrap()] {
40
Some(ref mut isr) => isr(),
41
- None => default_interrupt_handler(interrupt_number.try_into().unwrap()),
+ None => default_interrupt_handler(irqn.try_into().unwrap()),
42
}
43
44
0 commit comments