mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-07-29 09:48:34 -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
|
@ -3,12 +3,11 @@
|
|||
|
||||
#include "config.h"
|
||||
#include "debug.h"
|
||||
#include "io.h"
|
||||
#include "lib.h"
|
||||
#include "mem.h"
|
||||
#include "print.h"
|
||||
|
||||
#define MODE_CH552 0x10
|
||||
|
||||
void printStr(uint8_t *str)
|
||||
{
|
||||
#ifdef USE_DEBUG_PRINT
|
||||
|
@ -19,7 +18,7 @@ void printStr(uint8_t *str)
|
|||
}
|
||||
#elif defined(DEBUG_PRINT_SW)
|
||||
uint32_t str_len = strlen(str);
|
||||
CH554UART1SendByte(MODE_CH552);
|
||||
CH554UART1SendByte(IO_CH552);
|
||||
CH554UART1SendByte(str_len);
|
||||
CH554UART1SendBuffer(str, str_len);
|
||||
#endif
|
||||
|
@ -34,7 +33,7 @@ void printChar(uint8_t c)
|
|||
#if defined(DEBUG_PRINT_HW)
|
||||
CH554UART0SendByte(c);
|
||||
#elif defined(DEBUG_PRINT_SW)
|
||||
CH554UART1SendByte(MODE_CH552);
|
||||
CH554UART1SendByte(IO_CH552);
|
||||
CH554UART1SendByte(1);
|
||||
CH554UART1SendByte(c);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue