[FL-2836] Fast flash programming mode (#1782)

* updater: lowered logging level for resources unpacking; hal: implemented fast flash write mode
* hal: reworked fast flash programming; clearing most error flags on flash init; changed some flash functions return type from bool to void; scripts: fixed malformed CRC values in update bundles in certain cases;
* hal: flash: larger critical section
* hal: flash: enabling fast write inside critical section
* api_symbols: bump minor version
This commit is contained in:
hedger
2022-09-26 15:03:21 +04:00
committed by GitHub
parent a6b98ccbbe
commit efb09380bd
7 changed files with 110 additions and 83 deletions

View File

@@ -109,10 +109,7 @@ static int storage_int_device_prog(
int ret = 0;
while(size > 0) {
if(!furi_hal_flash_write_dword(address, *(uint64_t*)buffer)) {
ret = -1;
break;
}
furi_hal_flash_write_dword(address, *(uint64_t*)buffer);
address += c->prog_size;
buffer += c->prog_size;
size -= c->prog_size;
@@ -127,16 +124,13 @@ static int storage_int_device_erase(const struct lfs_config* c, lfs_block_t bloc
FURI_LOG_D(TAG, "Device erase: page %d, translated page: %x", block, page);
if(furi_hal_flash_erase(page)) {
return 0;
} else {
return -1;
}
furi_hal_flash_erase(page);
return 0;
}
static int storage_int_device_sync(const struct lfs_config* c) {
UNUSED(c);
FURI_LOG_D(TAG, "Device sync: skipping, cause ");
FURI_LOG_D(TAG, "Device sync: skipping");
return 0;
}