Skip to content

Commit

Permalink
Change DefaultIrqHandler to spin, not panic.
Browse files Browse the repository at this point in the history
Also it doesn't need to be unsafe.
  • Loading branch information
jonathanpallant committed Nov 13, 2024
1 parent e2b3113 commit 0b81e79
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions rp235x-hal/src/arch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,16 +473,15 @@ mod inner {

/// Our default IRQ handler.
///
/// Just panics.
///
/// # Safety
///
/// Do not call this function - it is called automatically when our
/// `MachineExternal` interrupt handler can't find anything better to call.
/// Just spins.
#[no_mangle]
#[allow(non_snake_case)]
unsafe fn DefaultIrqHandler() {
panic!();
fn DefaultIrqHandler() {
// Spin, so you can attach a debugger if you get stuck here.
// This is the also the default functionality used in cortex-m-rt.
loop {
crate::arch::nop();
}
}
}

Expand Down

0 comments on commit 0b81e79

Please sign in to comment.