Skip to content

Commit b0f1169

Browse files
committed
enable CFG_TUH_CDC for rp2040 core
1 parent ddde366 commit b0f1169

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/arduino/ports/rp2040/tusb_config_rp2040.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,33 @@ extern int serial1_printf(const char *__restrict __format, ...);
9797
// Size of buffer to hold descriptors and other data used for enumeration
9898
#define CFG_TUH_ENUMERATION_BUFSIZE 256
9999

100+
// Number of hub devices
100101
#define CFG_TUH_HUB 1
102+
101103
// max device support (excluding hub device)
102104
#define CFG_TUH_DEVICE_MAX (CFG_TUH_HUB ? 4 : 1) // hub typically has 4 ports
103105

104106
// Enable tuh_edpt_xfer() API
105107
//#define CFG_TUH_API_EDPT_XFER 1
106108

109+
// Number of mass storage
107110
#define CFG_TUH_MSC 1
111+
112+
// Number of HIDs
108113
#define CFG_TUH_HID 4
109114

115+
// Number of CDC interfaces
116+
#define CFG_TUH_CDC 1
117+
118+
// Set Line Control state on enumeration/mounted:
119+
// DTR ( bit 0), RTS (bit 1)
120+
#define CFG_TUH_CDC_LINE_CONTROL_ON_ENUM 0x03
121+
122+
// Set Line Coding on enumeration/mounted, value for cdc_line_coding_t
123+
// bit rate = 115200, 1 stop bit, no parity, 8 bit data width
124+
// This need https://github.com/sekigon-gonnoc/Pico-PIO-USB/pull/58 to be merged first
125+
// #define CFG_TUH_CDC_LINE_CODING_ON_ENUM { 115200, CDC_LINE_CONDING_STOP_BITS_1, CDC_LINE_CODING_PARITY_NONE, 8 }
126+
110127
#ifdef __cplusplus
111128
}
112129
#endif

0 commit comments

Comments
 (0)