7#include <update_util/update_manifest.h>
12#define UPDATE_DELAY_OPERATION_OK 10
13#define UPDATE_DELAY_OPERATION_ERROR INT_MAX
16 UpdateTaskStageProgress = 0,
18 UpdateTaskStageReadManifest,
19 UpdateTaskStageIntBackup,
21 UpdateTaskStageRadioImageValidate,
22 UpdateTaskStageRadioErase,
23 UpdateTaskStageRadioWrite,
24 UpdateTaskStageRadioInstall,
25 UpdateTaskStageRadioBusy,
27 UpdateTaskStageOBValidation,
29 UpdateTaskStageValidateDFUImage,
30 UpdateTaskStageFlashWrite,
31 UpdateTaskStageFlashValidate,
33 UpdateTaskStageIntRestore,
34 UpdateTaskStageResourcesFileCleanup,
35 UpdateTaskStageResourcesDirCleanup,
36 UpdateTaskStageResourcesFileUnpack,
37 UpdateTaskStageSplashscreenInstall,
39 UpdateTaskStageCompleted,
41 UpdateTaskStageOBError,
45inline bool update_stage_is_error(
const UpdateTaskStage stage) {
46 return stage >= UpdateTaskStageError;
50 UpdateTaskStageGroupMisc = 0,
51 UpdateTaskStageGroupPreUpdate = 1 << 1,
52 UpdateTaskStageGroupFirmware = 1 << 2,
53 UpdateTaskStageGroupOptionBytes = 1 << 3,
54 UpdateTaskStageGroupRadio = 1 << 4,
55 UpdateTaskStageGroupPostUpdate = 1 << 5,
56 UpdateTaskStageGroupResources = 1 << 6,
57 UpdateTaskStageGroupSplashscreen = 1 << 7,
58} UpdateTaskStageGroup;
61 UpdateTaskStage stage;
62 uint8_t overall_progress, stage_progress;
64 UpdateTaskStageGroup groups;
65 uint32_t total_progress_points;
66 uint32_t completed_stages_points;
72 *updateProgressCb)(
const char* status,
const uint8_t stage_pct,
bool failed,
void* state);
78void update_task_set_progress_cb(
UpdateTask* update_task, updateProgressCb cb,
void* state);
80void update_task_start(
UpdateTask* update_task);
82bool update_task_is_running(
UpdateTask* update_task);
Definition update_manifest.h:29
Definition update_task_i.h:9
Definition update_task.h:60