Add project files.

This commit is contained in:
2022-09-05 13:51:05 +10:00
parent 727c68ea6c
commit 62cdc57333
262 changed files with 82611 additions and 0 deletions

22
gen_rt2rth.py Normal file
View File

@@ -0,0 +1,22 @@
with open("record_types.txt", "r") as f:
data = f.read()
GROUPING = 3
PREFIX = "RT_"
line = []
out = ""
for i, l in enumerate(data.split("\n")):
word = l.strip()
#bytes_ = [ord(c) for c in word]
#le_hex = "".join([hex(c)[2:] for c in reversed(bytes_)])
#line += [f"0x{le_hex}u"]
line += [f"[{word}] = {PREFIX}{word}"]
if (i + 1) % GROUPING == 0:
out += ", ".join(line) + ",\n"
line = []
if line:
out += ", ".join(line) + ",\n"
print(out)