Revert "pre-commit: autoupdate hooks (#1618)"

This reverts commit 526588b3e9.
This commit is contained in:
Adeeb Shihadeh
2023-08-30 10:38:12 -07:00
parent e30ba9547c
commit bc2f10da57
6 changed files with 17 additions and 17 deletions

View File

@@ -421,7 +421,7 @@ class STBootloaderSPIHandle(BaseSTBootloaderHandle):
def program(self, address, dat):
bs = 256 # max block size for writing to flash over SPI
dat += b"\xFF" * ((bs - len(dat)) % bs)
for i in range(len(dat) // bs):
for i in range(0, len(dat) // bs):
block = dat[i * bs:(i + 1) * bs]
self._cmd(0x31, data=[
struct.pack('>I', address + i*bs),