diff options
| author | Ha Thach <[email protected]> | 2023-12-12 15:54:35 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-12-12 15:54:35 +0700 |
| commit | 59ecdb78fed4221c3e623d7ea9a9e69c3cd87aae (patch) | |
| tree | e7a70ab799b30b9d4fe23c105fc742225ef31b73 | |
| parent | 6bb92555f3b1c3d1302d444b4a7352875e51678f (diff) | |
| parent | 9a7e23379ccd4fe572af824c09d6113401412522 (diff) | |
Merge pull request #2368 from LarssonOliver/master
Add configuration option CFG_TUH_CDC_FTDI_PID_LIST to tusb_option.h
| -rw-r--r-- | src/class/cdc/cdc_host.c | 2 | ||||
| -rw-r--r-- | src/class/cdc/serial/ftdi_sio.h | 5 | ||||
| -rw-r--r-- | src/tusb_option.h | 6 |
3 files changed, 8 insertions, 5 deletions
diff --git a/src/class/cdc/cdc_host.c b/src/class/cdc/cdc_host.c index a6af9b84d..a6dfb45ae 100644 --- a/src/class/cdc/cdc_host.c +++ b/src/class/cdc/cdc_host.c @@ -90,7 +90,7 @@ static bool acm_set_baudrate(cdch_interface_t* p_cdc, uint32_t baudrate, tuh_xfe #if CFG_TUH_CDC_FTDI #include "serial/ftdi_sio.h" -static uint16_t const ftdi_pids[] = { TU_FTDI_PID_LIST }; +static uint16_t const ftdi_pids[] = { CFG_TUH_CDC_FTDI_PID_LIST }; enum { FTDI_PID_COUNT = sizeof(ftdi_pids) / sizeof(ftdi_pids[0]) }; diff --git a/src/class/cdc/serial/ftdi_sio.h b/src/class/cdc/serial/ftdi_sio.h index 6916e4031..0825f0719 100644 --- a/src/class/cdc/serial/ftdi_sio.h +++ b/src/class/cdc/serial/ftdi_sio.h @@ -25,11 +25,8 @@ #ifndef TUSB_FTDI_SIO_H #define TUSB_FTDI_SIO_H -// VID/PID for matching FTDI devices +// VID for matching FTDI devices #define TU_FTDI_VID 0x0403 -#define TU_FTDI_PID_LIST \ - 0x6001, 0x6006, 0x6010, 0x6011, 0x6014, 0x6015, 0x8372, 0xFBFA, \ - 0xcd18 // Commands #define FTDI_SIO_RESET 0 /* Reset the port */ diff --git a/src/tusb_option.h b/src/tusb_option.h index 900784388..7597392d6 100644 --- a/src/tusb_option.h +++ b/src/tusb_option.h @@ -442,6 +442,12 @@ #define CFG_TUH_CDC_FTDI 0 #endif +#ifndef CFG_TUH_CDC_FTDI_PID_LIST + // List of product IDs that can use the FTDI CDC driver + #define CFG_TUH_CDC_FTDI_PID_LIST \ + 0x6001, 0x6006, 0x6010, 0x6011, 0x6014, 0x6015, 0x8372, 0xFBFA, 0xCD18 +#endif + #ifndef CFG_TUH_CDC_CP210X // CP210X is not part of CDC class, only to re-use CDC driver API #define CFG_TUH_CDC_CP210X 0 |
