|
SimpleOTA client v1.0.1
Shared core of the SimpleOTA Arduino and ESP-IDF clients
|
Writing an update into the next app slot. More...
Go to the source code of this file.
Functions | |
| bool | sota_image_begin (size_t expected, uint32_t *slot, uint32_t *running) |
| Start writing the slot after the running one. | |
| bool | sota_image_write (const uint8_t *buf, size_t len) |
| Write the next bytes, in order. | |
| void | sota_image_abort (void) |
| Give up the write. | |
| bool | sota_image_finish (void) |
| End the write and check the image is one the bootloader can start. | |
Writing an update into the next app slot.
Implemented by the platform port (esp_ota_* on ESP32) and the host tests' fake.
One write at a time. Nothing here makes the image bootable: the engine saves the trial record first and then switches the slot (sota_boot.h).
| bool sota_image_begin | ( | size_t | expected, |
| uint32_t * | slot, | ||
| uint32_t * | running | ||
| ) |
Start writing the slot after the running one.
expected is the image size, 0 when unknown. *slot gets the flash address written to, and *running the running image's.
| bool sota_image_finish | ( | void | ) |
End the write and check the image is one the bootloader can start.
The write is over either way.