nrf: nvm: assume sd is not enabled if interrupts are off
If interrupts are disabled, then calling sd_* functions will hardfault. Instead, assume that it's safe to write if interrupts are disabled. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
fd4ef233c6
commit
67cf005ee5
|
@ -40,6 +40,8 @@
|
|||
|
||||
STATIC bool sd_is_enabled(void) {
|
||||
uint8_t sd_en = 0;
|
||||
if (__get_PRIMASK())
|
||||
return false;
|
||||
(void) sd_softdevice_is_enabled(&sd_en);
|
||||
return sd_en;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue