19#ifndef PROTOCORE_OTA_ROLLBACK_H
20#define PROTOCORE_OTA_ROLLBACK_H
25#if PC_ENABLE_OTA_ROLLBACK
31 static constexpr uint8_t PC_OTA_IMG_NEW = 0;
32 static constexpr uint8_t PC_OTA_IMG_PENDING_VERIFY = 1;
33 static constexpr uint8_t PC_OTA_IMG_VALID = 2;
34 static constexpr uint8_t PC_OTA_IMG_INVALID = 3;
35 static constexpr uint8_t PC_OTA_IMG_ABORTED = 4;
36 static constexpr uint8_t PC_OTA_IMG_UNDEFINED = 0xFF;
40enum class pc_ota_action : uint8_t
60pc_ota_action pc_ota_decide(uint8_t img_state,
bool self_test_ok, uint32_t ms_since_boot, uint32_t window_ms);
67uint8_t pc_ota_img_state(
void);
70void pc_ota_commit(
void);
73void pc_ota_rollback(
void);
80pc_ota_action pc_ota_rollback_tick(
bool self_test_ok);
User-facing configuration for ProtoCore.