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:
Jonas Thörnblad 2024-07-04 18:24:07 +02:00 committed by Mikael Ågren
parent f6c0501db9
commit a0910e25c3
No known key found for this signature in database
GPG key ID: E02DA3D397792C46
12 changed files with 2047 additions and 1138 deletions

View file

@ -1,15 +1,31 @@
#ifndef USB_STRINGS
#define USB_STRINGS
unsigned char __code Prod_Des[]={ // "MTA1-USB-V1"
0x18, 0x03, 0x4d, 0x00, 0x54, 0x00, 0x41, 0x00, 0x31, 0x00, 0x2d, 0x00, 0x55, 0x00, 0x53, 0x00, 0x42, 0x00, 0x2d, 0x00, 0x56, 0x00, 0x31, 0x00
#ifndef __USB_STRINGS_H__
#define __USB_STRINGS_H__
#include "mem.h"
unsigned char FLASH ProdDesc[]={ // "MTA1-USB-V1"
0x18, 0x03, 0x4d, 0x00, 0x54, 0x00, 0x41, 0x00,
0x31, 0x00, 0x2d, 0x00, 0x55, 0x00, 0x53, 0x00,
0x42, 0x00, 0x2d, 0x00, 0x56, 0x00, 0x31, 0x00
};
unsigned char __code Manuf_Des[]={ // "Tillitis"
0x12, 0x03, 0x54, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x6c, 0x00, 0x69, 0x00, 0x74, 0x00, 0x69, 0x00, 0x73, 0x00
unsigned char FLASH ManufDesc[]={ // "Tillitis"
0x12, 0x03, 0x54, 0x00, 0x69, 0x00, 0x6c, 0x00,
0x6c, 0x00, 0x69, 0x00, 0x74, 0x00, 0x69, 0x00,
0x73, 0x00
};
unsigned char __code SerDes[]={ // "68de5d27-e223-4874-bc76-a54d6e84068f"
0x4a, 0x03, 0x36, 0x00, 0x38, 0x00, 0x64, 0x00, 0x65, 0x00, 0x35, 0x00, 0x64, 0x00, 0x32, 0x00, 0x37, 0x00, 0x2d, 0x00, 0x65, 0x00, 0x32, 0x00, 0x32, 0x00, 0x33, 0x00, 0x2d, 0x00, 0x34, 0x00, 0x38, 0x00, 0x37, 0x00, 0x34, 0x00, 0x2d, 0x00, 0x62, 0x00, 0x63, 0x00, 0x37, 0x00, 0x36, 0x00, 0x2d, 0x00, 0x61, 0x00, 0x35, 0x00, 0x34, 0x00, 0x64, 0x00, 0x36, 0x00, 0x65, 0x00, 0x38, 0x00, 0x34, 0x00, 0x30, 0x00, 0x36, 0x00, 0x38, 0x00, 0x66, 0x00
unsigned char FLASH SerialDesc[]={ // "68de5d27-e223-4874-bc76-a54d6e84068f"
0x4a, 0x03, 0x36, 0x00, 0x38, 0x00, 0x64, 0x00,
0x65, 0x00, 0x35, 0x00, 0x64, 0x00, 0x32, 0x00,
0x37, 0x00, 0x2d, 0x00, 0x65, 0x00, 0x32, 0x00,
0x32, 0x00, 0x33, 0x00, 0x2d, 0x00, 0x34, 0x00,
0x38, 0x00, 0x37, 0x00, 0x34, 0x00, 0x2d, 0x00,
0x62, 0x00, 0x63, 0x00, 0x37, 0x00, 0x36, 0x00,
0x2d, 0x00, 0x61, 0x00, 0x35, 0x00, 0x34, 0x00,
0x64, 0x00, 0x36, 0x00, 0x65, 0x00, 0x38, 0x00,
0x34, 0x00, 0x30, 0x00, 0x36, 0x00, 0x38, 0x00,
0x66, 0x00
};
#endif