summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2026-06-22 22:20:29 +0700
committerGitHub <[email protected]>2026-06-22 22:20:29 +0700
commitcd3561bf158afd5a5718904b8139a338d1e3b67c (patch)
tree4b9d46e8b6397ba050d7fba159a67efc0d511eca /src/common
parent299c0a55629691f6bbded895a4be377633e815ab (diff)
parent706e4a5daaf8bbb55f0a7d00b69d4bc3c4cd70eb (diff)
Merge pull request #3515 from alt-0191/ch58x
Add support for WCH ch582/583 series
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_mcu.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/common/tusb_mcu.h b/src/common/tusb_mcu.h
index cc9837dcd..b5390a59d 100644
--- a/src/common/tusb_mcu.h
+++ b/src/common/tusb_mcu.h
@@ -659,6 +659,19 @@
#define TUP_DCD_EDPT_CLOSE_API
#endif
+#elif TU_CHECK_MCU(OPT_MCU_CH583)
+ // CH582/583 USBFS: older WCH USBFS IP with a single combined per-endpoint control register
+ // (like CH32V103), driven by the shared dcd_ch32_usbfs.c on USB0 (rhport 0). Device only:
+ // the shared hcd_ch32_usbfs.c is CH32V20x-specific and does not support CH58x, so host /
+ // USB2 (rhport 1) is not provided here.
+ #define TUP_USBIP_WCH_USBFS
+
+ #ifndef CFG_TUD_WCH_USBIP_USBFS
+ #define CFG_TUD_WCH_USBIP_USBFS 1
+ #endif
+
+ #define TUP_DCD_ENDPOINT_MAX 8
+
//--------------------------------------------------------------------+
// Analog Devices
//--------------------------------------------------------------------+