summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Shawcroft <scott@adafruit.com>2019-12-12 10:17:26 -0800
committerGitHub <noreply@github.com>2019-12-12 10:17:26 -0800
commit887f64eed8d7c06182aa100a8131cc9b8b7dbd47 (patch)
tree0c33ee4d01fa38fead399739eeb4c724accd517b
parentbf8796bca459c675e4e28097d75493e81e6502c3 (diff)
parentfd03fd5e4f7d6a7fb5e126a5e56955e73a0d0711 (diff)
Merge pull request #2376 from dhalbert/nrf-internal-flash-volatile-fix
nrf: sd_flash_operation_status should be volatile
-rw-r--r--ports/nrf/bluetooth/ble_drv.c2
-rw-r--r--ports/nrf/bluetooth/ble_drv.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/ports/nrf/bluetooth/ble_drv.c b/ports/nrf/bluetooth/ble_drv.c
index 63d67a7f4..7dbb31582 100644
--- a/ports/nrf/bluetooth/ble_drv.c
+++ b/ports/nrf/bluetooth/ble_drv.c
@@ -43,7 +43,7 @@
nrf_nvic_state_t nrf_nvic_state = { 0 };
// Flag indicating progress of internal flash operation.
-sd_flash_operation_status_t sd_flash_operation_status;
+volatile sd_flash_operation_status_t sd_flash_operation_status;
__attribute__((aligned(4)))
static uint8_t m_ble_evt_buf[sizeof(ble_evt_t) + (BLE_GATT_ATT_MTU_DEFAULT)];
diff --git a/ports/nrf/bluetooth/ble_drv.h b/ports/nrf/bluetooth/ble_drv.h
index 7716cab8b..91990da6d 100644
--- a/ports/nrf/bluetooth/ble_drv.h
+++ b/ports/nrf/bluetooth/ble_drv.h
@@ -59,7 +59,7 @@ typedef enum {
} sd_flash_operation_status_t;
// Flag indicating progress of internal flash operation.
-extern sd_flash_operation_status_t sd_flash_operation_status;
+extern volatile sd_flash_operation_status_t sd_flash_operation_status;
typedef struct ble_drv_evt_handler_entry {
struct ble_drv_evt_handler_entry *next;