mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-13 19:18:56 +00:00
tools: move code generating tools to tools/codegen
This commit is contained in:
parent
98bdd99b97
commit
da8cc37a54
@ -14,7 +14,7 @@ fields = [
|
||||
'segwit',
|
||||
]
|
||||
|
||||
coins = json.load(open('../../trezor-common/coins.json', 'r'))
|
||||
coins = json.load(open('../../../trezor-common/coins.json', 'r'))
|
||||
|
||||
print('COINS = [')
|
||||
for c in coins:
|
@ -1,4 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# script used to generate /embed/extmod/modtrezorui/font_*_*.c
|
||||
|
||||
|
||||
import freetype
|
||||
|
||||
MIN_GLYPH = ord(' ')
|
@ -3,9 +3,11 @@
|
||||
import binascii
|
||||
import ed25519raw
|
||||
|
||||
|
||||
def hex_to_c(s):
|
||||
return '"\\x' + '\\x'.join([s[i:i + 2] for i in range(0, len(s), 2)]) + '"'
|
||||
|
||||
|
||||
for c in 'ABCDEFGHI':
|
||||
print()
|
||||
seckey = c.encode() * 32
|
@ -1,4 +1,7 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
# script used to generate /embed/extmod/modtrezorui/loader.h
|
||||
|
||||
import math
|
||||
import sys
|
||||
|
||||
@ -15,7 +18,7 @@ with open('loader.h', 'wt') as f:
|
||||
c = {}
|
||||
for i in [5, 15]:
|
||||
if (inner - 0.5 <= d) and (d <= inner + 0.5):
|
||||
c[i] = 15 * (d - inner + 0.5);
|
||||
c[i] = 15 * (d - inner + 0.5)
|
||||
elif (inner + 0.5 <= d) and (d <= inner + 1.5):
|
||||
c[i] = 15
|
||||
elif (inner + 1.5 <= d) and (d <= inner + 2.5):
|
Loading…
Reference in New Issue
Block a user