Compare commits

...

2 Commits

Author SHA1 Message Date
d354696fe9 maple: add maple_bus_ft6 2024-05-19 15:04:59 -05:00
d2ee2c9fe5 maple: regenerate ft0/ft8 2024-05-19 14:59:33 -05:00
5 changed files with 41 additions and 29 deletions

View File

@ -47,6 +47,15 @@ maple/maple_bus_commands.hpp: regs/maple_bus_commands.csv regs/gen/maple_bus_com
maple/maple_bus_bits.hpp: regs/maple_bus_bits.csv regs/gen/core_bits.py
python regs/gen/core_bits.py $< > $@
maple/maple_bus_ft0.hpp: regs/maple_bus_ft0.csv regs/gen/maple_data_format.py
python regs/gen/maple_data_format.py $< > $@
maple/maple_bus_ft6.hpp: regs/maple_bus_ft6.csv regs/gen/maple_data_format.py
python regs/gen/maple_data_format.py $< > $@
maple/maple_bus_ft8.hpp: regs/maple_bus_ft8.csv regs/gen/maple_data_format.py
python regs/gen/maple_data_format.py $< > $@
# AICA
aica/aica_channel.hpp: regs/aica_channel_data.csv regs/gen/aica.py

View File

@ -62,5 +62,6 @@ namespace ft0 {
};
static_assert((sizeof (struct data_format)) == 8);
}
}

View File

@ -109,8 +109,10 @@ def render_format(format):
yield f"uint8_t {field_name};"
elif len(subfields) == 2:
yield f"uint16_t {field_name};"
elif len(subfields) == 6:
yield f"uint8_t {field_name}[6];"
else:
assert False, len(subfields)
assert False, (len(subfields), field_name)
yield "};"
assert format.size % 4 == 0, format.size

Binary file not shown.