aboutsummaryrefslogtreecommitdiff
path: root/ports/zephyr/modzephyr.c
diff options
context:
space:
mode:
authorMaureen Helm2019-12-30 17:44:15 -0600
committerDamien George2020-02-07 11:24:06 +1100
commit86a66960f9a3538de9d48abb719975741569495f (patch)
treeb32b57cca43d7bde3e9ade199aaae724460ad016 /ports/zephyr/modzephyr.c
parent2d7ec8e704968fdac574de1bd0f2d48bc43bd485 (diff)
zephyr: Implement block device protocol via zephyr flash map api.
Introduces a new zephyr.FlashArea class that uses the zephyr flash map api to implement the uos.AbstractBlockDev protocol. The flash driver is enabled on the frdm_k64f board, reel_board, and rv32m1_vega_ri5cy board. The standard and extended block device protocols are both supported, therefore this class can be used with file systems like littlefs which require the extended interface.
Diffstat (limited to 'ports/zephyr/modzephyr.c')
-rw-r--r--ports/zephyr/modzephyr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ports/zephyr/modzephyr.c b/ports/zephyr/modzephyr.c
index e24bdd0b9..02ad35685 100644
--- a/ports/zephyr/modzephyr.c
+++ b/ports/zephyr/modzephyr.c
@@ -95,6 +95,9 @@ STATIC const mp_rom_map_elem_t mp_module_time_globals_table[] = {
#ifdef CONFIG_DISK_ACCESS
{ MP_ROM_QSTR(MP_QSTR_DiskAccess), MP_ROM_PTR(&zephyr_disk_access_type) },
#endif
+ #ifdef CONFIG_FLASH_MAP
+ { MP_ROM_QSTR(MP_QSTR_FlashArea), MP_ROM_PTR(&zephyr_flash_area_type) },
+ #endif
};
STATIC MP_DEFINE_CONST_DICT(mp_module_time_globals, mp_module_time_globals_table);