Skip to content

Commit 96ec89f

Browse files
committed
Fix SWI2 IRQ handler with nrf_pac
1 parent 6ff8113 commit 96ec89f

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

nrf-softdevice/src/events.rs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,24 @@ 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"
109+
)]
110+
#[cfg_attr(
111+
not(any(feature = "nrf52805", feature = "nrf52810", feature = "nrf52811")),
112+
allow(dead_code)
109113
)]
110114
unsafe extern "C" fn swi2_irq_handler() {
111115
SWI2_SOC_EVT_WAKER.wake();
112116
SWI2_BLE_EVT_WAKER.wake();
113117
}
118+
119+
/// Support older PACs which use a different name for the SWI2 interrupt
120+
#[cfg_attr(
121+
not(any(feature = "nrf52805", feature = "nrf52810", feature = "nrf52811")),
122+
export_name = "SWI2_EGU2"
123+
)]
124+
#[allow(dead_code)]
125+
unsafe extern "C" fn old_swi2_irq_handler() {
126+
SWI2_SOC_EVT_WAKER.wake();
127+
SWI2_BLE_EVT_WAKER.wake();
128+
}

0 commit comments

Comments
 (0)