Skip to content

Commit

Permalink
Fix SWI2 IRQ attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmoon committed Nov 17, 2024
1 parent 96ec89f commit d554940
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions nrf-softdevice/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,21 +107,15 @@ pub(crate) async fn run_ble() -> ! {
not(any(feature = "nrf52805", feature = "nrf52810", feature = "nrf52811")),
export_name = "EGU2_SWI2"
)]
#[cfg_attr(
not(any(feature = "nrf52805", feature = "nrf52810", feature = "nrf52811")),
allow(dead_code)
)]
unsafe extern "C" fn swi2_irq_handler() {
SWI2_SOC_EVT_WAKER.wake();
SWI2_BLE_EVT_WAKER.wake();
}

/// Support older PACs which use a different name for the SWI2 interrupt
#[cfg_attr(
not(any(feature = "nrf52805", feature = "nrf52810", feature = "nrf52811")),
export_name = "SWI2_EGU2"
)]
/// `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();
Expand Down

0 comments on commit d554940

Please sign in to comment.