Skip to content

Commit d554940

Browse files
committed
Fix SWI2 IRQ attributes
1 parent 96ec89f commit d554940

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

nrf-softdevice/src/events.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,21 +107,15 @@ pub(crate) async fn run_ble() -> ! {
107107
not(any(feature = "nrf52805", feature = "nrf52810", feature = "nrf52811")),
108108
export_name = "EGU2_SWI2"
109109
)]
110-
#[cfg_attr(
111-
not(any(feature = "nrf52805", feature = "nrf52810", feature = "nrf52811")),
112-
allow(dead_code)
113-
)]
114110
unsafe extern "C" fn swi2_irq_handler() {
115111
SWI2_SOC_EVT_WAKER.wake();
116112
SWI2_BLE_EVT_WAKER.wake();
117113
}
118114

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-
)]
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")))]
124117
#[allow(dead_code)]
118+
#[export_name = "SWI2_EGU2"]
125119
unsafe extern "C" fn old_swi2_irq_handler() {
126120
SWI2_SOC_EVT_WAKER.wake();
127121
SWI2_BLE_EVT_WAKER.wake();

0 commit comments

Comments
 (0)