This is the documentation for the latest development branch of MicroPython and may refer to features that are not available in released versions.

If you are looking for the documentation for a specific release, use the drop-down menu on the left and select the desired version.

zephyr.FlashArea

Classes

FlashArea

Gets an object for accessing flash memory at partition specified by id and with block size of block_size.

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 of block_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 as FlashArea.STORAGE if FLASH_AREA_LABEL_EXISTS(storage) returns true at boot. Zephyr devicetree fixed flash partitions are boot_partition, slot0_partition, slot1_partition, and scratch_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