File espos_ota.h¶
FileList > espos_ota > include > espos_ota.h
Go to the source code of this file
#include <stdbool.h>#include <stddef.h>#include <stdint.h>#include "esp_err.h"
Public Types¶
| Type | Name |
|---|---|
| enum | espos_ota_state_t |
Public Functions¶
| Type | Name |
|---|---|
| bool | espos_ota_busy (void) True while an update is under way: a manifest check, a download, the verification or the reboot after it or a request queued for the OTA task that it has not taken yet, because POST /api/v1/ota answers before the task does. |
| esp_err_t | espos_ota_check_now (void) Fetch the manifest now (async; result in status / SSE "ota"). |
| esp_err_t | espos_ota_confirm (void) Confirm the running image (cancels a pending rollback). |
| esp_err_t | espos_ota_install_available (void) Install the build found by the last check. |
| esp_err_t | espos_ota_install_url (const char * url) Install from an explicit URL (async). |
| esp_err_t | espos_ota_rollback (void) Mark the running image invalid and reboot into the other slot. |
| esp_err_t | espos_ota_start (void) |
| const char * | espos_ota_state_name (espos_ota_state_t s) |
| char * | espos_ota_status_json (void) Status document of docs/rest-api.md (malloc'ed). |
| void | espos_ota_stop (void) |
Public Types Documentation¶
enum espos_ota_state_t¶
enum espos_ota_state_t {
ESPOS_OTA_IDLE = 0,
ESPOS_OTA_CHECKING,
ESPOS_OTA_AVAILABLE,
ESPOS_OTA_DOWNLOADING,
ESPOS_OTA_VERIFYING,
ESPOS_OTA_READY,
ESPOS_OTA_FAILED
};
Public Functions Documentation¶
function espos_ota_busy¶
True while an update is under way: a manifest check, a download, the verification or the reboot after it or a request queued for the OTA task that it has not taken yet, because POST /api/v1/ota answers before the task does.
For code that must not sleep or cut the power in the middle of one (espos_power). False before espos_ota_start(). Safe from any task.
function espos_ota_check_now¶
Fetch the manifest now (async; result in status / SSE "ota").
function espos_ota_confirm¶
Confirm the running image (cancels a pending rollback).
function espos_ota_install_available¶
Install the build found by the last check.
ESP_ERR_NOT_FOUND if none.
function espos_ota_install_url¶
Install from an explicit URL (async).
ESP_ERR_INVALID_STATE while busy.
function espos_ota_rollback¶
Mark the running image invalid and reboot into the other slot.
function espos_ota_start¶
function espos_ota_state_name¶
function espos_ota_status_json¶
Status document of docs/rest-api.md (malloc'ed).
function espos_ota_stop¶
The documentation for this class was generated from the following file espos_ota/include/espos_ota.h