mirror of https://github.com/ARMmbed/mbed-os.git
Nordic BLE: Protect event signaled flag.
parent
f5ac8d69ce
commit
02e3c13d25
|
@ -233,8 +233,12 @@ nRF5xn::waitForEvent(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void nRF5xn::processEvents() {
|
void nRF5xn::processEvents() {
|
||||||
|
core_util_critical_section_enter();
|
||||||
if (isEventsSignaled) {
|
if (isEventsSignaled) {
|
||||||
isEventsSignaled = false;
|
isEventsSignaled = false;
|
||||||
|
core_util_critical_section_exit();
|
||||||
intern_softdevice_events_execute();
|
intern_softdevice_events_execute();
|
||||||
|
} else {
|
||||||
|
core_util_critical_section_exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue