Skip to content

Commit b53991e

Browse files
authored
Merge pull request #280 from alexmoon/fix-irq
Fix SWI2 IRQ handler with `nrf_pac`
2 parents 6ff8113 + d554940 commit b53991e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

nrf-softdevice/src/events.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,18 @@ pub(crate) async fn run_ble() -> ! {
105105
)]
106106
#[cfg_attr(
107107
not(any(feature = "nrf52805", feature = "nrf52810", feature = "nrf52811")),
108-
export_name = "SWI2_EGU2"
108+
export_name = "EGU2_SWI2"
109109
)]
110110
unsafe extern "C" fn swi2_irq_handler() {
111111
SWI2_SOC_EVT_WAKER.wake();
112112
SWI2_BLE_EVT_WAKER.wake();
113113
}
114+
115+
/// `nrf528xx_pac` and early versions of `nrf_pac` name the SWI2 interrupt `SWI2_EGU2` instead of `EGU2_SWI2`
116+
#[cfg(not(any(feature = "nrf52805", feature = "nrf52810", feature = "nrf52811")))]
117+
#[allow(dead_code)]
118+
#[export_name = "SWI2_EGU2"]
119+
unsafe extern "C" fn old_swi2_irq_handler() {
120+
SWI2_SOC_EVT_WAKER.wake();
121+
SWI2_BLE_EVT_WAKER.wake();
122+
}

0 commit comments

Comments
 (0)