mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-07-27 08:55:23 -04:00
WIP: Add USB HID and framing support over UART
- Add USB HID support. - Add framing to distinguish between CDC and HID data sent over the UART. - Add some debug printing. - Cleanup of code and formatting.
This commit is contained in:
parent
f6c0501db9
commit
a0910e25c3
12 changed files with 2047 additions and 1138 deletions
|
@ -37,17 +37,17 @@ if __name__ == "__main__":
|
|||
f.write('#ifndef USB_STRINGS\n')
|
||||
f.write('#define USB_STRINGS\n')
|
||||
|
||||
f.write('unsigned char __code Prod_Des[]={{ // "{}"\n'.format(product))
|
||||
f.write('unsigned char __code ProdDesc[]={{ // "{}"\n'.format(product))
|
||||
f.write(' ')
|
||||
f.write(', '.join(['0x{:02x}'.format(i) for i in string_to_descriptor(product)]))
|
||||
f.write('\n};\n\n')
|
||||
|
||||
f.write('unsigned char __code Manuf_Des[]={{ // "{}"\n'.format(manufacturer))
|
||||
f.write('unsigned char __code ManufDesc[]={{ // "{}"\n'.format(manufacturer))
|
||||
f.write(' ')
|
||||
f.write(', '.join(['0x{:02x}'.format(i) for i in string_to_descriptor(manufacturer)]))
|
||||
f.write('\n};\n\n')
|
||||
|
||||
f.write('unsigned char __code SerDes[]={{ // "{}"\n'.format(serial))
|
||||
f.write('unsigned char __code SerialDesc[]={{ // "{}"\n'.format(serial))
|
||||
f.write(' ')
|
||||
f.write(', '.join(['0x{:02x}'.format(i) for i in string_to_descriptor(serial)]))
|
||||
f.write('\n};\n\n')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue