fix ci, remove use of CFG_TUSB_RHPORT0_MODE in bsp

This commit is contained in:
hathach
2022-06-06 12:51:10 +07:00
parent f626916a57
commit 7187cd9a85
11 changed files with 114 additions and 58 deletions
+14 -2
View File
@@ -34,6 +34,18 @@
#include "fsl_sctimer.h"
#include "sct_neopixel.h"
#ifdef BOARD_TUD_RHPORT
#define PORT_SUPPORT_DEVICE(_n) (BOARD_TUD_RHPORT == _n)
#else
#define PORT_SUPPORT_DEVICE(_n) 0
#endif
#ifdef BOARD_TUH_RHPORT
#define PORT_SUPPORT_HOST(_n) (BOARD_TUH_RHPORT == _n)
#else
#define PORT_SUPPORT_HOST(_n) 0
#endif
//--------------------------------------------------------------------+
// MACRO TYPEDEF CONSTANT ENUM
//--------------------------------------------------------------------+
@@ -164,7 +176,7 @@ void board_init(void)
/* PORT0 PIN22 configured as USB0_VBUS */
IOCON_PinMuxSet(IOCON, 0U, 22U, IOCON_PIO_DIG_FUNC7_EN);
#if CFG_TUSB_RHPORT0_MODE & OPT_MODE_DEVICE
#if PORT_SUPPORT_DEVICE(0)
// Port0 is Full Speed
/* Turn on USB0 Phy */
@@ -189,7 +201,7 @@ void board_init(void)
CLOCK_EnableUsbfs0DeviceClock(kCLOCK_UsbfsSrcFro, CLOCK_GetFreq(kCLOCK_FroHf));
#endif
#if CFG_TUSB_RHPORT1_MODE & OPT_MODE_DEVICE
#if PORT_SUPPORT_DEVICE(1)
// Port1 is High Speed
/* Turn on USB1 Phy */