19#ifndef DETERMINISTICESPASYNCWEBSERVER_OTA_ROLLBACK_H
20#define DETERMINISTICESPASYNCWEBSERVER_OTA_ROLLBACK_H
25#if DETWS_ENABLE_OTA_ROLLBACK
31 static constexpr uint8_t DETWS_OTA_IMG_NEW = 0;
32 static constexpr uint8_t DETWS_OTA_IMG_PENDING_VERIFY = 1;
33 static constexpr uint8_t DETWS_OTA_IMG_VALID = 2;
34 static constexpr uint8_t DETWS_OTA_IMG_INVALID = 3;
35 static constexpr uint8_t DETWS_OTA_IMG_ABORTED = 4;
36 static constexpr uint8_t DETWS_OTA_IMG_UNDEFINED = 0xFF;
40enum class DetwsOtaAction : uint8_t
44 DETWS_OTA_ROLLBACK = 2,
60DetwsOtaAction detws_ota_decide(uint8_t img_state,
bool self_test_ok, uint32_t ms_since_boot, uint32_t window_ms);
67uint8_t detws_ota_img_state(
void);
70void detws_ota_commit(
void);
73void detws_ota_rollback(
void);
80DetwsOtaAction detws_ota_rollback_tick(
bool self_test_ok);
User-facing configuration for DeterministicESPAsyncWebServer.