Merge branch 'flipperdevices:dev' into dev

This commit is contained in:
Eng1n33r
2022-06-21 17:31:47 +03:00
committed by GitHub
104 changed files with 3513 additions and 4180 deletions
+6
View File
@@ -17,6 +17,7 @@
#define MANIFEST_KEY_OB_REFERENCE "OB reference"
#define MANIFEST_KEY_OB_MASK "OB mask"
#define MANIFEST_KEY_OB_WRITE_MASK "OB write mask"
#define MANIFEST_KEY_SPLASH_FILE "Splashscreen"
UpdateManifest* update_manifest_alloc() {
UpdateManifest* update_manifest = malloc(sizeof(UpdateManifest));
@@ -25,6 +26,7 @@ UpdateManifest* update_manifest_alloc() {
string_init(update_manifest->radio_image);
string_init(update_manifest->staged_loader_file);
string_init(update_manifest->resource_bundle);
string_init(update_manifest->splash_file);
update_manifest->target = 0;
update_manifest->manifest_version = 0;
memset(update_manifest->ob_reference.bytes, 0, FURI_HAL_FLASH_OB_RAW_SIZE_BYTES);
@@ -41,6 +43,7 @@ void update_manifest_free(UpdateManifest* update_manifest) {
string_clear(update_manifest->radio_image);
string_clear(update_manifest->staged_loader_file);
string_clear(update_manifest->resource_bundle);
string_clear(update_manifest->splash_file);
free(update_manifest);
}
@@ -107,6 +110,9 @@ static bool
update_manifest->ob_write_mask.bytes,
FURI_HAL_FLASH_OB_RAW_SIZE_BYTES);
flipper_format_read_string(
flipper_file, MANIFEST_KEY_SPLASH_FILE, update_manifest->splash_file);
update_manifest->valid =
(!string_empty_p(update_manifest->firmware_dfu_image) ||
!string_empty_p(update_manifest->radio_image) ||
+1
View File
@@ -42,6 +42,7 @@ typedef struct {
FuriHalFlashRawOptionByteData ob_reference;
FuriHalFlashRawOptionByteData ob_compare_mask;
FuriHalFlashRawOptionByteData ob_write_mask;
string_t splash_file;
bool valid;
} UpdateManifest;