diff options
| author | hathach <[email protected]> | 2022-06-06 12:51:10 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2022-06-06 12:51:10 +0700 |
| commit | 7187cd9a8528bfe2b570567ca2d0a2ae36b7c478 (patch) | |
| tree | 69420646c32dea57cde33784e39fbb99fba35808 /hw/bsp/lpc55 | |
| parent | f626916a5733fc7beff29ff6f907433e28ff14e0 (diff) | |
fix ci, remove use of CFG_TUSB_RHPORT0_MODE in bsp
Diffstat (limited to 'hw/bsp/lpc55')
| -rw-r--r-- | hw/bsp/lpc55/family.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/hw/bsp/lpc55/family.c b/hw/bsp/lpc55/family.c index f037a9f5b..e7aed5759 100644 --- a/hw/bsp/lpc55/family.c +++ b/hw/bsp/lpc55/family.c @@ -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 */ |
