Skip to content

Commit 02e3c13

Browse files
committed
Nordic BLE: Protect event signaled flag.
1 parent f5ac8d6 commit 02e3c13

File tree

1 file changed

+4
-0
lines changed
  • features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5/source

1 file changed

+4
-0
lines changed

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5/source/nRF5xn.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,12 @@ nRF5xn::waitForEvent(void)
233233
}
234234

235235
void nRF5xn::processEvents() {
236+
core_util_critical_section_enter();
236237
if (isEventsSignaled) {
237238
isEventsSignaled = false;
239+
core_util_critical_section_exit();
238240
intern_softdevice_events_execute();
241+
} else {
242+
core_util_critical_section_exit();
239243
}
240244
}

0 commit comments

Comments
 (0)