Loading...
Searching...
No Matches
update_task_i.h
1#pragma once
2
3#include <storage/storage.h>
4#include <furi_hal.h>
5
6#define UPDATE_TASK_NOERR 0
7#define UPDATE_TASK_FAILED -1
8
9typedef struct UpdateTask {
10 UpdateTaskState state;
11 FuriString* update_path;
12 UpdateManifest* manifest;
13 FuriThread* thread;
14 Storage* storage;
15 File* file;
16 updateProgressCb status_change_cb;
17 void* status_change_cb_state;
18 FuriHalRtcBootMode boot_mode;
20
21void update_task_set_progress(UpdateTask* update_task, UpdateTaskStage stage, uint8_t progress);
22bool update_task_parse_manifest(UpdateTask* update_task);
23bool update_task_open_file(UpdateTask* update_task, FuriString* filename);
24
25int32_t update_task_worker_flash_writer(void* context);
26int32_t update_task_worker_backup_restore(void* context);
27
28#define CHECK_RESULT(x) \
29 if(!(x)) { \
30 break; \
31 }
Furi HAL API.
FuriHalRtcBootMode
Definition furi_hal_rtc.h:29
APIs for working with storages, directories and files.
Structure that hold file index and returned api errors.
Definition filesystem_api_internal.h:17
Definition string.c:4
Definition thread.c:33
Definition storage_i.h:23
Definition update_manifest.h:29
Definition update_task_i.h:9
Definition update_task.h:60