ESP32 OTA Upgrader implementation. More...
#include <IdfUpgrader.h>
Public Member Functions | |
bool | begin (Partition partition, size_t size=0) override |
Prepares a partition for an upgrade. The preparation is bootloader and architecture dependent. More... | |
size_t | write (const uint8_t *buffer, size_t size) override |
Writes chunk of data to the partition set in begin() . More... | |
bool | end () override |
Finalizes the partition upgrade. More... | |
bool | abort () override |
Aborts a partition upgrade. More... | |
bool | setBootPartition (Partition partition, bool save=true) override |
Sets the default partition from where the application will be booted on next restart. More... | |
Partition | getBootPartition () override |
Gets information about the partition that is set as the default one to boot. More... | |
Partition | getRunningPartition () override |
Gets information about the partition from which the current application is running. More... | |
Partition | getNextBootPartition (Partition startFrom={}) override |
Gets the next bootable partition that can be used after successful OTA upgrade. More... | |
![]() | |
virtual | ~UpgraderBase () |
Storage::Iterator | getBootPartitions () |
Gets information about all bootable partitions. More... | |
uint8_t | getSlot (Partition partition) |
Gets slot number for a partition. More... | |
Static Public Member Functions | |
static const esp_partition_t * | convertToIdfPartition (Partition partition) |
static Partition | convertFromIdfPartition (const esp_partition_t *partition) |
Additional Inherited Members | |
![]() | |
using | Partition = Storage::Partition |
![]() | |
static constexpr uint8_t | SLOT_NONE {255} |
Detailed Description
ESP32 OTA Upgrader implementation.
Member Function Documentation
◆ abort()
|
inlineoverridevirtual |
Aborts a partition upgrade.
Reimplemented from Ota::UpgraderBase.
◆ begin()
|
overridevirtual |
Prepares a partition for an upgrade. The preparation is bootloader and architecture dependent.
- Parameters
-
partition size
- Return values
-
bool
Implements Ota::UpgraderBase.
◆ convertFromIdfPartition()
|
inlinestatic |
◆ convertToIdfPartition()
|
inlinestatic |
◆ end()
|
inlineoverridevirtual |
Finalizes the partition upgrade.
Implements Ota::UpgraderBase.
◆ getBootPartition()
|
inlineoverridevirtual |
Gets information about the partition that is set as the default one to boot.
- Note
- The returned partition can be different than the current running partition.
- Return values
-
partition
Implements Ota::UpgraderBase.
◆ getNextBootPartition()
Gets the next bootable partition that can be used after successful OTA upgrade.
- Parameters
-
startFrom - optional
- Return values
-
partition
Implements Ota::UpgraderBase.
◆ getRunningPartition()
|
inlineoverridevirtual |
Gets information about the partition from which the current application is running.
- Note
- The returned partition can be different than the default boot partition.
- Return values
-
partition
Implements Ota::UpgraderBase.
◆ setBootPartition()
|
inlineoverridevirtual |
Sets the default partition from where the application will be booted on next restart.
- Parameters
-
partition save if true the change is persisted on the flash, otherwise it will be valid only for the next boot
- Return values
-
bool
Implements Ota::UpgraderBase.
◆ write()
|
overridevirtual |
Writes chunk of data to the partition set in begin()
.
- Parameters
-
buffer size
- Return values
-
size_t actually written bytes
Implements Ota::UpgraderBase.
The documentation for this class was generated from the following file: