Skip to content

Commit c4e04d3

Browse files
committed
Add configuration option CFG_TUH_CDC_CP210X_PID_LIST to tusb_option.h
1 parent 10558ac commit c4e04d3

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/class/cdc/cdc_host.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ static bool ftdi_sio_set_baudrate(cdch_interface_t* p_cdc, uint32_t baudrate, tu
109109
#if CFG_TUH_CDC_CP210X
110110
#include "serial/cp210x.h"
111111

112-
static uint16_t const cp210x_pids[] = { TU_CP210X_PID_LIST };
112+
static uint16_t const cp210x_pids[] = { CFG_TUH_CDC_CP210X_PID_LIST };
113113
enum {
114114
CP210X_PID_COUNT = sizeof(cp210x_pids) / sizeof(cp210x_pids[0])
115115
};

src/class/cdc/serial/cp210x.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
// https://www.silabs.com/documents/public/application-notes/AN571.pdf
3030

3131
#define TU_CP210X_VID 0x10C4
32-
#define TU_CP210X_PID_LIST \
33-
0xEA60, 0xEA70
3432

3533
/* Config request codes */
3634
#define CP210X_IFC_ENABLE 0x00

src/tusb_option.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,12 @@
441441
#define CFG_TUH_CDC_CP210X 0
442442
#endif
443443

444+
#ifndef CFG_TUH_CDC_CP210X_PID_LIST
445+
// List of product IDs that can use the CP210X CDC driver
446+
#define CFG_TUH_CDC_CP210X_PID_LIST \
447+
0xEA60, 0xEA70
448+
#endif
449+
444450
#ifndef CFG_TUH_HID
445451
#define CFG_TUH_HID 0
446452
#endif

0 commit comments

Comments
 (0)