mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-05-04 23:14:59 -04:00
ch552: Add USB HID and protocol support over UART
- Add USB HID support. - Introduce a small protocol 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
90fca5d3dd
commit
b443359e9c
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