[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

@@ -229,7 +229,7 @@ class Main(App):
@staticmethod
def int2ffhex(value: int, n_hex_syms=8):
if value:
n_hex_syms = math.ceil(math.ceil(math.log2(value)) / 8) * 2
n_hex_syms = max(math.ceil(math.ceil(math.log2(value)) / 8) * 2, n_hex_syms)
fmtstr = f"%0{n_hex_syms}X"
hexstr = fmtstr % value
return " ".join(list(Main.batch(hexstr, 2))[::-1])