@@ -34,8 +34,10 @@ extern "C" {
3434//--------------------------------------------------------------------
3535#if defined(CH32V20x )
3636#define CFG_TUSB_MCU OPT_MCU_CH32V20X
37+
3738#elif defined(CH32V30x )
3839#define CFG_TUSB_MCU OPT_MCU_CH32V307
40+
3941#endif
4042
4143#define CFG_TUSB_OS OPT_OS_NONE
@@ -105,8 +107,8 @@ extern "C" {
105107#define CFG_TUD_VIDEO_STREAMING_EP_BUFSIZE 256
106108
107109// CDC FIFO size of TX and RX
108- #define CFG_TUD_CDC_RX_BUFSIZE 256
109- #define CFG_TUD_CDC_TX_BUFSIZE 256
110+ #define CFG_TUD_CDC_RX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 256)
111+ #define CFG_TUD_CDC_TX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 256)
110112
111113// MSC Buffer size of Device Mass storage
112114#define CFG_TUD_MSC_EP_BUFSIZE 512
@@ -120,17 +122,17 @@ extern "C" {
120122
121123// Vendor FIFO size of TX and RX
122124#ifndef CFG_TUD_VENDOR_RX_BUFSIZE
123- #define CFG_TUD_VENDOR_RX_BUFSIZE 64
125+ #define CFG_TUD_VENDOR_RX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
124126#endif
125127
126128#ifndef CFG_TUD_VENDOR_TX_BUFSIZE
127- #define CFG_TUD_VENDOR_TX_BUFSIZE 64
129+ #define CFG_TUD_VENDOR_TX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
128130#endif
129131
130132//--------------------------------------------------------------------
131133// Host Configuration
132134//--------------------------------------------------------------------
133-
135+ #if 0
134136// Size of buffer to hold descriptors and other data used for enumeration
135137#define CFG_TUH_ENUMERATION_BUFSIZE 256
136138
@@ -158,8 +160,8 @@ extern "C" {
158160#define CFG_TUH_CDC_CH34X 1
159161
160162// RX & TX fifo size
161- #define CFG_TUH_CDC_RX_BUFSIZE 64
162- #define CFG_TUH_CDC_TX_BUFSIZE 64
163+ #define CFG_TUH_CDC_RX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
164+ #define CFG_TUH_CDC_TX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
163165
164166// Set Line Control state on enumeration/mounted:
165167// DTR ( bit 0), RTS (bit 1)
@@ -170,6 +172,7 @@ extern "C" {
170172// This need Pico-PIO-USB at least 0.5.1
171173#define CFG_TUH_CDC_LINE_CODING_ON_ENUM \
172174 { 115200, CDC_LINE_CONDING_STOP_BITS_1, CDC_LINE_CODING_PARITY_NONE, 8 }
175+ #endif
173176
174177#ifdef __cplusplus
175178}
0 commit comments