|
SimpleOTA client v1.0.1
Shared core of the SimpleOTA Arduino and ESP-IDF clients
|
The managed task, implemented by the port (FreeRTOS on ESP32): it checks in on the engine's schedule, applies what is offered, and runs the confirm timeout's rollback. More...
Go to the source code of this file.
Data Structures | |
| struct | sota_runner_t |
| The managed task's settings and state. More... | |
Functions | |
| bool | sota_runner_start (sota_runner_t *r, const char *name) |
| Start the task, if it is not running. | |
| bool | sota_runner_stop (sota_runner_t *r, uint32_t timeout_ms) |
| Ask the task to stop after its current step, so a download or flash write is never cut short, and wait up to timeout_ms for it. | |
| void | sota_runner_wake (sota_runner_t *r) |
| For sota_app_wake(): wake the task to check now or handle the confirm timeout. | |
| bool | sota_runner_on_task (const sota_runner_t *r) |
| The calling code runs on the runner's task. | |
The managed task, implemented by the port (FreeRTOS on ESP32): it checks in on the engine's schedule, applies what is offered, and runs the confirm timeout's rollback.
simpleota_start() runs it.
| bool sota_runner_start | ( | sota_runner_t * | r, |
| const char * | name | ||
| ) |
Start the task, if it is not running.
False when it could not start.
| bool sota_runner_stop | ( | sota_runner_t * | r, |
| uint32_t | timeout_ms | ||
| ) |
Ask the task to stop after its current step, so a download or flash write is never cut short, and wait up to timeout_ms for it.
From the task itself (a callback), returns true at once and the task stops after the callback. False when it is still running at the timeout.
| void sota_runner_wake | ( | sota_runner_t * | r | ) |
For sota_app_wake(): wake the task to check now or handle the confirm timeout.
Without a running task, the timeout's rollback runs on a short-lived task, since it writes storage and restarts.