- minor update to ep_set_response_and_toggle/xfer_data_packet
- merge USBHS_ISO_ACT_FLAG, USBHS_TRANSFER_FLAG handler since they are similar - improve uart output - add note for link speed in bus reset
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
#include <ch32v30x.h>
|
||||
|
||||
|
||||
#define UART_RINGBUFFER_SIZE_TX 64
|
||||
#define UART_RINGBUFFER_SIZE_TX 128
|
||||
#define UART_RINGBUFFER_MASK_TX (UART_RINGBUFFER_SIZE_TX-1)
|
||||
|
||||
static char tx_buf[UART_RINGBUFFER_SIZE_TX];
|
||||
|
@@ -72,7 +72,7 @@ void board_init(void) {
|
||||
SysTick_Config(SystemCoreClock / 1000);
|
||||
#endif
|
||||
|
||||
usart_printf_init(115200);
|
||||
usart_printf_init(CFG_BOARD_UART_BAUDRATE);
|
||||
|
||||
#if CFG_TUD_MAX_SPEED == OPT_MODE_HIGH_SPEED
|
||||
// Use Highspeed USB
|
||||
@@ -150,10 +150,11 @@ int board_uart_read(uint8_t* buf, int len) {
|
||||
|
||||
int board_uart_write(void const* buf, int len) {
|
||||
int txsize = len;
|
||||
const char* bufc = (const char*) buf;
|
||||
while (txsize--) {
|
||||
uart_write(*(uint8_t const*) buf);
|
||||
buf++;
|
||||
uart_write(*bufc++);
|
||||
}
|
||||
uart_sync();
|
||||
return len;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user