[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:
@@ -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])
|
||||
|
Reference in New Issue
Block a user