add ch32 support for fsdev driver. v20x can select fsdev or usbfs with make/cmake PORT=0/1. default to fsdev
This commit is contained in:
@@ -128,6 +128,7 @@
|
||||
#define TU_ATTR_SECTION(sec_name) __attribute__ ((section(#sec_name)))
|
||||
#define TU_ATTR_PACKED __attribute__ ((packed))
|
||||
#define TU_ATTR_WEAK __attribute__ ((weak))
|
||||
// #define TU_ATTR_WEAK_ALIAS(f) __attribute__ ((weak, alias(#f))
|
||||
#ifndef TU_ATTR_ALWAYS_INLINE // allow to override for debug
|
||||
#define TU_ATTR_ALWAYS_INLINE __attribute__ ((always_inline))
|
||||
#endif
|
||||
|
||||
@@ -423,7 +423,6 @@
|
||||
#elif TU_CHECK_MCU(OPT_MCU_CH32V20X)
|
||||
// v20x support both FSDEV (USBD) and USBFS, default to FSDEV
|
||||
#define TUP_USBIP_WCH_USBFS
|
||||
#define TUP_DCD_ENDPOINT_MAX 8
|
||||
#define TUP_USBIP_FSDEV
|
||||
#define TUP_USBIP_FSDEV_CH32
|
||||
|
||||
@@ -431,10 +430,12 @@
|
||||
#define CFG_TUD_WCH_USBIP_USBFS 0
|
||||
#endif
|
||||
|
||||
#if !defined(CFG_TUD_WCH_FSDEV)
|
||||
#if !defined(CFG_TUD_WCH_USBIP_FSDEV)
|
||||
#define CFG_TUD_WCH_USBIP_FSDEV (CFG_TUD_WCH_USBIP_USBFS ? 0 : 1)
|
||||
#endif
|
||||
|
||||
#define TUP_DCD_ENDPOINT_MAX 8
|
||||
|
||||
#elif TU_CHECK_MCU(OPT_MCU_CH32V307)
|
||||
// v307 support both FS and HS, default to HS
|
||||
#define TUP_USBIP_WCH_USBHS
|
||||
|
||||
Reference in New Issue
Block a user