diff options
| author | Ha Thach <[email protected]> | 2024-05-20 18:47:22 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-05-20 18:47:22 +0700 |
| commit | a068b81674e8b47d6fb78ab6a06abb7decc2e644 (patch) | |
| tree | c06d196aa384da214b4dc0062d61ce46a13982d6 /src/common | |
| parent | ccc7a36043e055ded1f478a979a303e694123187 (diff) | |
| parent | 10b1e38404c044345e9ea0f3e5c678af94eb0f0a (diff) | |
Merge pull request #2362 from dragonlock2/master
Add CH32V20x USB OTG/FS Driver
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/tusb_mcu.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/common/tusb_mcu.h b/src/common/tusb_mcu.h index 1699867c8..abfed2835 100644 --- a/src/common/tusb_mcu.h +++ b/src/common/tusb_mcu.h @@ -404,12 +404,24 @@ //------------- WCH -------------// #elif TU_CHECK_MCU(OPT_MCU_CH32V307) - #define TUP_DCD_ENDPOINT_MAX 16 - #define TUP_RHPORT_HIGHSPEED 1 + // v307 support both FS and HS + #define TUP_USBIP_WCH_USBHS + #define TUP_USBIP_WCH_USBFS + + #define TUP_RHPORT_HIGHSPEED 1 // default to highspeed + #define TUP_DCD_ENDPOINT_MAX (CFG_TUD_MAX_SPEED == OPT_MODE_HIGH_SPEED ? 16 : 8) #elif TU_CHECK_MCU(OPT_MCU_CH32F20X) - #define TUP_DCD_ENDPOINT_MAX 16 - #define TUP_RHPORT_HIGHSPEED 1 + #define TUP_USBIP_WCH_USBHS + #define TUP_USBIP_WCH_USBFS + + #define TUP_RHPORT_HIGHSPEED 1 // default to highspeed + #define TUP_DCD_ENDPOINT_MAX (CFG_TUD_MAX_SPEED == OPT_MODE_HIGH_SPEED ? 16 : 8) + +#elif TU_CHECK_MCU(OPT_MCU_CH32V20X) + #define TUP_USBIP_WCH_USBFS + #define TUP_DCD_ENDPOINT_MAX 8 + #endif |
