diff options
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)``. |