mirror of
https://github.com/romychs/OK240.2-Firmware.git
synced 2026-04-21 10:53:18 +03:00
21 lines
441 B
Python
Executable File
21 lines
441 B
Python
Executable File
#!/bin/python3
|
|
|
|
row = 32
|
|
col = 0
|
|
width = 7
|
|
|
|
with open('font.bin', 'rb') as f:
|
|
data = f.read()
|
|
for b in data:
|
|
print("0x{:02x}".format(b), end='')
|
|
if col < (width-1):
|
|
print(", ", end='')
|
|
col = col + 1
|
|
if col == width:
|
|
col = 0
|
|
if row < 127:
|
|
print(" ; '{}'".format(chr(row)))
|
|
else:
|
|
print(" ; xx")
|
|
row = row + 1
|