diff options
author | Damien George <damien@micropython.org> | 2022-02-07 21:05:48 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2022-02-22 00:37:25 +1100 |
commit | 106a83de222a7c9ceb3f70ca214677c996916489 (patch) | |
tree | 590cb07a795dddbe8518ef6a3527a0b0f45d9bbd /docs/library/esp32.rst | |
parent | 5935fa229c94e53c4b23d0a491cb16d9adb9dada (diff) | |
download | micropython-106a83de222a7c9ceb3f70ca214677c996916489.tar.gz micropython-106a83de222a7c9ceb3f70ca214677c996916489.zip |
esp32/esp32_partition: Add support for specifying block_size.
To support filesystems that use a block size different from the native
erase-page size.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'docs/library/esp32.rst')
-rw-r--r-- | docs/library/esp32.rst | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/library/esp32.rst b/docs/library/esp32.rst index ff1c99a553..82e69e4964 100644 --- a/docs/library/esp32.rst +++ b/docs/library/esp32.rst @@ -68,17 +68,21 @@ Flash partitions This class gives access to the partitions in the device's flash memory and includes methods to enable over-the-air (OTA) updates. -.. class:: Partition(id) +.. class:: Partition(id, block_size=4096) Create an object representing a partition. *id* can be a string which is the label of the partition to retrieve, or one of the constants: ``BOOT`` or ``RUNNING``. + *block_size* specifies the byte size of an individual block. -.. classmethod:: Partition.find(type=TYPE_APP, subtype=0xff, label=None) +.. classmethod:: Partition.find(type=TYPE_APP, subtype=0xff, label=None, block_size=4096) Find a partition specified by *type*, *subtype* and *label*. Returns a (possibly empty) list of Partition objects. Note: ``subtype=0xff`` matches any subtype and ``label=None`` matches any label. + *block_size* specifies the byte size of an individual block used by the returned + objects. + .. method:: Partition.info() Returns a 6-tuple ``(type, subtype, addr, size, label, encrypted)``. |