Skip to content

Commit

Permalink
DBG: print bitfile blks in-place
Browse files Browse the repository at this point in the history
  • Loading branch information
dchabot committed Jan 8, 2025
1 parent 4b7c5ac commit af5179e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion badger/tests/spi_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,12 +428,14 @@ def remote_program(s, file_name, ad, size):
f = open(file_name, 'rb')
# assume that '.bin' file size is always less than whole pages
for ba in reversed(range(start_p, stop_p)):
print("block %d" % ba)
print("block %d\r" % ba, end='', flush=True)
f.seek((ba << 8) - ad)
bd = f.read(PAGE)
while not (write_enable(s, True)):
time.sleep(WAIT)
page_program(s, ba << 8, bd)
else:
print('')
f.close()
return

Expand Down

0 comments on commit af5179e

Please sign in to comment.