summaryrefslogtreecommitdiff
path: root/src/tusb_option.h
diff options
context:
space:
mode:
authorIngHK <[email protected]>2023-12-26 20:14:03 +0100
committerIngHK <[email protected]>2023-12-26 20:14:03 +0100
commitc2bbcc9f60a2b7293fad4e24468d3f045fde28ee (patch)
treebb1b3af3a5bda9f3a1ae7df5967f674104bedb02 /src/tusb_option.h
parentae364b1460b91153cd94b4b0303eeda6419ff1d1 (diff)
initial support of CH34x CDC device
Diffstat (limited to 'src/tusb_option.h')
-rw-r--r--src/tusb_option.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tusb_option.h b/src/tusb_option.h
index a76281c0c..13151a07b 100644
--- a/src/tusb_option.h
+++ b/src/tusb_option.h
@@ -470,6 +470,23 @@
0xEA60, 0xEA70
#endif
+#ifndef CFG_TUH_CDC_CH34X
+ // CH34X is not part of CDC class, only to re-use CDC driver API
+ #define CFG_TUH_CDC_CH34X 0
+#endif
+
+#ifndef CFG_TUH_CDC_CH34X_VID_PID_LIST
+ // List of product IDs that can use the CH34X CDC driver
+ #define CFG_TUH_CDC_CH34X_VID_PID_LIST \
+ { 0x1a86, 0x7523 }, /* ch340 chip */ \
+ { 0x1a86, 0x7522 }, /* ch340k chip */ \
+ { 0x1a86, 0x5523 }, /* ch341 chip */ \
+ { 0x1a86, 0xe523 }, /* ch330 chip */ \
+ { 0x4348, 0x5523 }, /* ch340 custom chip */ \
+ { 0x2184, 0x0057 }, /* overtaken from Linux driver /drivers/usb/serial/ch341.c */ \
+ { 0x9986, 0x7523 } /* overtaken from Linux driver /drivers/usb/serial/ch341.c */
+#endif
+
#ifndef CFG_TUH_HID
#define CFG_TUH_HID 0
#endif