From d554940a57646328e1a0f913fe83e59e350019a1 Mon Sep 17 00:00:00 2001 From: Alex Moon Date: Sun, 17 Nov 2024 13:47:54 -0500 Subject: [PATCH] Fix SWI2 IRQ attributes --- nrf-softdevice/src/events.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/nrf-softdevice/src/events.rs b/nrf-softdevice/src/events.rs index 2ca970b..0a5b982 100644 --- a/nrf-softdevice/src/events.rs +++ b/nrf-softdevice/src/events.rs @@ -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();