Skip to content

Commit

Permalink
Merge pull request #280 from alexmoon/fix-irq
Browse files Browse the repository at this point in the history
Fix SWI2 IRQ handler with `nrf_pac`
  • Loading branch information
Dirbaio authored Nov 17, 2024
2 parents 6ff8113 + d554940 commit b53991e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion nrf-softdevice/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,18 @@ pub(crate) async fn run_ble() -> ! {
)]
#[cfg_attr(
not(any(feature = "nrf52805", feature = "nrf52810", feature = "nrf52811")),
export_name = "SWI2_EGU2"
export_name = "EGU2_SWI2"
)]
unsafe extern "C" fn swi2_irq_handler() {
SWI2_SOC_EVT_WAKER.wake();
SWI2_BLE_EVT_WAKER.wake();
}

/// `nrf528xx_pac` and early versions of `nrf_pac` name the SWI2 interrupt `SWI2_EGU2` instead of `EGU2_SWI2`
#[cfg(not(any(feature = "nrf52805", feature = "nrf52810", feature = "nrf52811")))]
#[allow(dead_code)]
#[export_name = "SWI2_EGU2"]
unsafe extern "C" fn old_swi2_irq_handler() {
SWI2_SOC_EVT_WAKER.wake();
SWI2_BLE_EVT_WAKER.wake();
}

0 comments on commit b53991e

Please sign in to comment.