diff options
| author | Glenn Ruben Bakke <glennbakke@gmail.com> | 2020-07-23 10:56:00 +0200 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2021-08-08 23:09:26 +1000 |
| commit | 5a873e27eb5d03f6d5cfedab2dbf3532ac8ac849 (patch) | |
| tree | bf555443ceed403c9eb518b4f56cc7b40fc2b093 | |
| parent | 127cec8cae3ae486acefb4dbf71b37181bd9ed5d (diff) | |
nrf/drivers: Add support for using flash block device with SoftDevice.
Update flash.c to also be compiled in when
MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE is enabled and SoftDevice is
present.
Update bluetooth/ble_drv.c to forward flash events to flash.c when
MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE is enabled.
| -rw-r--r-- | ports/nrf/drivers/bluetooth/ble_drv.c | 2 | ||||
| -rw-r--r-- | ports/nrf/drivers/flash.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ports/nrf/drivers/bluetooth/ble_drv.c b/ports/nrf/drivers/bluetooth/ble_drv.c index 3a15025cb..004058093 100644 --- a/ports/nrf/drivers/bluetooth/ble_drv.c +++ b/ports/nrf/drivers/bluetooth/ble_drv.c @@ -929,7 +929,7 @@ void ble_drv_discover_descriptors(void) { static void sd_evt_handler(uint32_t evt_id) { switch (evt_id) { -#if MICROPY_MBFS +#if MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE || MICROPY_MBFS case NRF_EVT_FLASH_OPERATION_SUCCESS: flash_operation_finished(FLASH_STATE_SUCCESS); break; diff --git a/ports/nrf/drivers/flash.c b/ports/nrf/drivers/flash.c index 5a7256a0c..85e5f71d6 100644 --- a/ports/nrf/drivers/flash.c +++ b/ports/nrf/drivers/flash.c @@ -26,7 +26,7 @@ #include "py/mpconfig.h" -#if MICROPY_MBFS && BLUETOOTH_SD +#if (MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE || MICROPY_MBFS) && BLUETOOTH_SD #include "drivers/flash.h" #include "drivers/bluetooth/ble_drv.h" @@ -129,4 +129,4 @@ void flash_write_bytes(uint32_t dst, const uint8_t *src, uint32_t num_bytes) { } } -#endif // MICROPY_MBFS +#endif // (MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE || MICROPY_MBFS) && BLUETOOTH_SD |
