mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-08-03 04:06:22 -04:00
ch552: Add functionality to dynamically control USB endpoints
- Make it possible to enable and disable endpoints on demand - Add internal FPGA<->CH552 communication channel (IO_CH552) - Reorder IO endpoint numbering - Rename endpoint from TKEYCTRL to DEBUG and update related variables - Rename endpoint from HID to FIDO and update related variables
This commit is contained in:
parent
d94387a9e7
commit
d43585ee1a
8 changed files with 453 additions and 365 deletions
18
hw/usb_interface/ch552_fw/inc/io.h
Normal file
18
hw/usb_interface/ch552_fw/inc/io.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
#ifndef __IO_H__
|
||||
#define __IO_H__
|
||||
|
||||
enum ioend {
|
||||
IO_NONE = 0x00, // No endpoint
|
||||
IO_UART = 0x01, // Only destination, raw UART access
|
||||
IO_QEMU = 0x02, // Only destination, QEMU debug port
|
||||
IO_CH552 = 0x10, // Internal CH552 control port
|
||||
IO_DEBUG = 0x20, // HID debug port
|
||||
IO_CDC = 0x40, // CDC "serial port"
|
||||
IO_FIDO = 0x80, // FIDO security token port
|
||||
};
|
||||
|
||||
enum ch552cmd {
|
||||
SET_ENDPOINTS = 0x01, // Config enabled/disabled USB endpoints on the CH552
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue