Skip to content

Commit 9a7e233

Browse files
committed
Add configuration option CFG_TUH_CDC_FTDI_PID_LIST to tusb_option.h
1 parent 4c80f5a commit 9a7e233

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/class/cdc/cdc_host.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ static bool acm_set_baudrate(cdch_interface_t* p_cdc, uint32_t baudrate, tuh_xfe
9090
#if CFG_TUH_CDC_FTDI
9191
#include "serial/ftdi_sio.h"
9292

93-
static uint16_t const ftdi_pids[] = { TU_FTDI_PID_LIST };
93+
static uint16_t const ftdi_pids[] = { CFG_TUH_CDC_FTDI_PID_LIST };
9494
enum {
9595
FTDI_PID_COUNT = sizeof(ftdi_pids) / sizeof(ftdi_pids[0])
9696
};

src/class/cdc/serial/ftdi_sio.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,8 @@
2525
#ifndef TUSB_FTDI_SIO_H
2626
#define TUSB_FTDI_SIO_H
2727

28-
// VID/PID for matching FTDI devices
28+
// VID for matching FTDI devices
2929
#define TU_FTDI_VID 0x0403
30-
#define TU_FTDI_PID_LIST \
31-
0x6001, 0x6006, 0x6010, 0x6011, 0x6014, 0x6015, 0x8372, 0xFBFA, \
32-
0xcd18
3330

3431
// Commands
3532
#define FTDI_SIO_RESET 0 /* Reset the port */

src/tusb_option.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,12 @@
442442
#define CFG_TUH_CDC_FTDI 0
443443
#endif
444444

445+
#ifndef CFG_TUH_CDC_FTDI_PID_LIST
446+
// List of product IDs that can use the FTDI CDC driver
447+
#define CFG_TUH_CDC_FTDI_PID_LIST \
448+
0x6001, 0x6006, 0x6010, 0x6011, 0x6014, 0x6015, 0x8372, 0xFBFA, 0xCD18
449+
#endif
450+
445451
#ifndef CFG_TUH_CDC_CP210X
446452
// CP210X is not part of CDC class, only to re-use CDC driver API
447453
#define CFG_TUH_CDC_CP210X 0

0 commit comments

Comments
 (0)