always define CFG_TUH_WCH_USBIP_USBFS=1 for ch32v20x since only port1 support host mode

reformat hcd usbfs
add uart rx for ch32v20x bsp
This commit is contained in:
hathach
2025-07-05 11:26:48 +07:00
parent 1b5f97ff23
commit 6e88895dbc
5 changed files with 483 additions and 577 deletions

View File

@@ -503,11 +503,17 @@
#define TUP_DCD_ENDPOINT_MAX 8
#elif TU_CHECK_MCU(OPT_MCU_CH32V20X)
// v20x support both FSDEV (USBD) and USBFS, default to FSDEV
// v20x support both port0 FSDEV (USBD) and port1 USBFS
#define TUP_USBIP_WCH_USBFS
#ifndef CFG_TUH_WCH_USBIP_USBFS
#define CFG_TUH_WCH_USBIP_USBFS 1
#endif
#define TUP_USBIP_FSDEV
#define TUP_USBIP_FSDEV_CH32
// default to FSDEV for device
#if !defined(CFG_TUD_WCH_USBIP_USBFS)
#define CFG_TUD_WCH_USBIP_USBFS 0
#endif

View File

@@ -27,7 +27,7 @@
#include "tusb_option.h"
#if CFG_TUD_ENABLED && defined(TUP_USBIP_WCH_USBHS) && CFG_TUD_WCH_USBIP_USBHS
#if CFG_TUD_ENABLED && defined(TUP_USBIP_WCH_USBHS) && defined(CFG_TUD_WCH_USBIP_USBHS) && CFG_TUD_WCH_USBIP_USBHS
#include "ch32_usbhs_reg.h"
#include "device/dcd.h"

File diff suppressed because it is too large Load Diff