Merge pull request #5202 from dhalbert/nrf-background-callback-critical-section
nrf: remove critical section around sd_app_evt_wait()
This commit is contained in:
commit
6f9078c546
@ -364,12 +364,9 @@ void port_idle_until_interrupt(void) {
|
|||||||
|
|
||||||
sd_softdevice_is_enabled(&sd_enabled);
|
sd_softdevice_is_enabled(&sd_enabled);
|
||||||
if (sd_enabled) {
|
if (sd_enabled) {
|
||||||
uint8_t is_nested_critical_region;
|
|
||||||
sd_nvic_critical_region_enter(&is_nested_critical_region);
|
|
||||||
if (!background_callback_pending()) {
|
if (!background_callback_pending()) {
|
||||||
sd_app_evt_wait();
|
sd_app_evt_wait();
|
||||||
}
|
}
|
||||||
sd_nvic_critical_region_exit(is_nested_critical_region);
|
|
||||||
} else {
|
} else {
|
||||||
// Call wait for interrupt ourselves if the SD isn't enabled.
|
// Call wait for interrupt ourselves if the SD isn't enabled.
|
||||||
// Note that `wfi` should be called with interrupts disabled,
|
// Note that `wfi` should be called with interrupts disabled,
|
||||||
|
Loading…
Reference in New Issue
Block a user