zephyr.FlashArea
Classes
Gets an object for accessing flash memory at partition specified by |
Module Contents
- class zephyr.FlashArea.FlashArea(id, block_size)
Gets an object for accessing flash memory at partition specified by
id
and with block size ofblock_size
.id
values are integers correlating to fixed flash partitions defined in the devicetree. A commonly used partition is the designated flash storage area defined asFlashArea.STORAGE
ifFLASH_AREA_LABEL_EXISTS(storage)
returns true at boot. Zephyr devicetree fixed flash partitions areboot_partition
,slot0_partition
,slot1_partition
, andscratch_partition
. Because MCUBoot is not enabled by default for MicroPython, these fixed partitions can be accessed by ID integer values 1, 2, 3, and 4, respectively.- ioctl(cmd, arg) → Incomplete
These methods implement the simple and extended block protocol defined by
vfs.AbstractBlockDev
.
- readblocks(block_num, buf, offset: int | None = 0) → Incomplete
- writeblocks(block_num, buf, offset: int | None = 0) → Incomplete