|
SimpleOTA client v1.0.1
Shared core of the SimpleOTA Arduino and ESP-IDF clients
|
Which image runs and which boots next. More...
Go to the source code of this file.
Data Structures | |
| struct | sota_boot_info_t |
| This boot, as the bootloader left it. More... | |
Macros | |
| #define | SOTA_NORETURN |
| Marks a function that does not return, in C and C++. | |
| #define | SOTA_IMAGE_ID_LEN 16u |
| Hex characters of an image fingerprint. | |
Functions | |
| void | sota_boot_info (sota_boot_info_t *info) |
| Fill info with this boot's facts. | |
| bool | sota_boot_slot_invalid (uint32_t part) |
| True when the bootloader has marked the slot at part invalid. | |
| bool | sota_boot_set (uint32_t part) |
| Boot the slot at part from the next reset on. | |
| bool | sota_boot_mark_valid (void) |
| Tell the bootloader the running image is good. | |
| void | sota_boot_rollback (uint32_t prev_part) |
| Leave the running image for the one at prev_part and restart: through the bootloader when it holds the running image on probation, otherwise by switching the slot. | |
Which image runs and which boots next.
Implemented by the platform port (esp_ota_* on ESP32) and the host tests' fake.
| bool sota_boot_mark_valid | ( | void | ) |
Tell the bootloader the running image is good.
True also when it was not on probation.
| void sota_boot_rollback | ( | uint32_t | prev_part | ) |
Leave the running image for the one at prev_part and restart: through the bootloader when it holds the running image on probation, otherwise by switching the slot.
Restarts even when a step fails.