@@ -34,8 +34,10 @@ extern "C" {
34
34
//--------------------------------------------------------------------
35
35
#if defined(CH32V20x )
36
36
#define CFG_TUSB_MCU OPT_MCU_CH32V20X
37
+
37
38
#elif defined(CH32V30x )
38
39
#define CFG_TUSB_MCU OPT_MCU_CH32V307
40
+
39
41
#endif
40
42
41
43
#define CFG_TUSB_OS OPT_OS_NONE
@@ -105,8 +107,8 @@ extern "C" {
105
107
#define CFG_TUD_VIDEO_STREAMING_EP_BUFSIZE 256
106
108
107
109
// 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)
110
112
111
113
// MSC Buffer size of Device Mass storage
112
114
#define CFG_TUD_MSC_EP_BUFSIZE 512
@@ -120,17 +122,17 @@ extern "C" {
120
122
121
123
// Vendor FIFO size of TX and RX
122
124
#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)
124
126
#endif
125
127
126
128
#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)
128
130
#endif
129
131
130
132
//--------------------------------------------------------------------
131
133
// Host Configuration
132
134
//--------------------------------------------------------------------
133
-
135
+ #if 0
134
136
// Size of buffer to hold descriptors and other data used for enumeration
135
137
#define CFG_TUH_ENUMERATION_BUFSIZE 256
136
138
@@ -158,8 +160,8 @@ extern "C" {
158
160
#define CFG_TUH_CDC_CH34X 1
159
161
160
162
// 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)
163
165
164
166
// Set Line Control state on enumeration/mounted:
165
167
// DTR ( bit 0), RTS (bit 1)
@@ -170,6 +172,7 @@ extern "C" {
170
172
// This need Pico-PIO-USB at least 0.5.1
171
173
#define CFG_TUH_CDC_LINE_CODING_ON_ENUM \
172
174
{ 115200, CDC_LINE_CONDING_STOP_BITS_1, CDC_LINE_CODING_PARITY_NONE, 8 }
175
+ #endif
173
176
174
177
#ifdef __cplusplus
175
178
}
0 commit comments