add new tusb_int_handler(rhport, in_isr) as common irq handler
update tusb_init() to take rhport and role, defined as macro with optional argument for backward compatible
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
set(MCU_VARIANT MIMXRT1062)
|
||||
|
||||
set(JLINK_DEVICE MIMXRT1062xxx6A)
|
||||
#set(JLINK_OPTION "-USB 000726129165")
|
||||
set(PYOCD_TARGET mimxrt1060)
|
||||
set(NXPLINK_DEVICE MIMXRT1062xxxxA:EVK-MIMXRT1060)
|
||||
|
||||
|
@@ -46,18 +46,6 @@
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#if defined(BOARD_TUD_RHPORT) && CFG_TUD_ENABLED
|
||||
#define PORT_SUPPORT_DEVICE(_n) (BOARD_TUD_RHPORT == _n)
|
||||
#else
|
||||
#define PORT_SUPPORT_DEVICE(_n) 0
|
||||
#endif
|
||||
|
||||
#if defined(BOARD_TUH_RHPORT) && CFG_TUH_ENABLED
|
||||
#define PORT_SUPPORT_HOST(_n) (BOARD_TUH_RHPORT == _n)
|
||||
#else
|
||||
#define PORT_SUPPORT_HOST(_n) 0
|
||||
#endif
|
||||
|
||||
// needed by fsl_flexspi_nor_boot
|
||||
TU_ATTR_USED const uint8_t dcd_data[] = { 0x00 };
|
||||
|
||||
@@ -156,23 +144,11 @@ void board_init(void)
|
||||
// USB Interrupt Handler
|
||||
//--------------------------------------------------------------------+
|
||||
void USB_OTG1_IRQHandler(void) {
|
||||
#if PORT_SUPPORT_DEVICE(0)
|
||||
tud_int_handler(0);
|
||||
#endif
|
||||
|
||||
#if PORT_SUPPORT_HOST(0)
|
||||
tuh_int_handler(0, true);
|
||||
#endif
|
||||
tusb_int_handler(0, true);
|
||||
}
|
||||
|
||||
void USB_OTG2_IRQHandler(void) {
|
||||
#if PORT_SUPPORT_DEVICE(1)
|
||||
tud_int_handler(1);
|
||||
#endif
|
||||
|
||||
#if PORT_SUPPORT_HOST(1)
|
||||
tuh_int_handler(1, true);
|
||||
#endif
|
||||
tusb_int_handler(1, true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
|
@@ -28,39 +28,15 @@
|
||||
#include "bsp/board_api.h"
|
||||
#include "board.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
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// USB Interrupt Handler
|
||||
//--------------------------------------------------------------------+
|
||||
void USB0_IRQHandler(void) {
|
||||
#if PORT_SUPPORT_DEVICE(0)
|
||||
tud_int_handler(0);
|
||||
#endif
|
||||
|
||||
#if PORT_SUPPORT_HOST(0)
|
||||
tuh_int_handler(0, true);
|
||||
#endif
|
||||
tusb_int_handler(0, true);
|
||||
}
|
||||
|
||||
void USB1_IRQHandler(void) {
|
||||
#if PORT_SUPPORT_DEVICE(1)
|
||||
tud_int_handler(1);
|
||||
#endif
|
||||
|
||||
#if PORT_SUPPORT_HOST(1)
|
||||
tuh_int_handler(1, true);
|
||||
#endif
|
||||
tusb_int_handler(1, true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
@@ -118,13 +94,8 @@ void board_init(void) {
|
||||
Chip_UART_TXEnable(UART_DEV);
|
||||
|
||||
//------------- USB -------------//
|
||||
#if PORT_SUPPORT_DEVICE(0) || PORT_SUPPORT_HOST(0)
|
||||
Chip_USB0_Init();
|
||||
#endif
|
||||
|
||||
#if PORT_SUPPORT_DEVICE(1) || PORT_SUPPORT_HOST(1)
|
||||
Chip_USB1_Init();
|
||||
#endif
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
|
@@ -39,18 +39,6 @@
|
||||
#include "bsp/board_api.h"
|
||||
#include "board.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
|
||||
|
||||
/* System configuration variables used by chip driver */
|
||||
const uint32_t OscRateIn = 12000000;
|
||||
const uint32_t ExtRateIn = 0;
|
||||
@@ -161,9 +149,7 @@ void board_init(void)
|
||||
* - Insert jumpers in position 2-3 in JP17/JP18/JP19
|
||||
* - Insert jumpers in JP31 (OTG)
|
||||
*/
|
||||
#if PORT_SUPPORT_DEVICE(0) || PORT_SUPPORT_HOST(0)
|
||||
Chip_USB0_Init();
|
||||
#endif
|
||||
|
||||
/* From EA4357 user manual
|
||||
*
|
||||
@@ -186,17 +172,15 @@ void board_init(void)
|
||||
* - LED34 lights green when +5V is available on J20.
|
||||
* - JP15 shall not be inserted. JP16 has no effect
|
||||
*/
|
||||
#if PORT_SUPPORT_DEVICE(1) || PORT_SUPPORT_HOST(1)
|
||||
Chip_USB1_Init();
|
||||
#endif
|
||||
|
||||
// USB0 Vbus Power: P2_3 on EA4357 channel B U20 GPIO26 active low (base board)
|
||||
Chip_SCU_PinMuxSet(2, 3, SCU_MODE_PULLUP | SCU_MODE_INBUFF_EN | SCU_MODE_FUNC7);
|
||||
|
||||
#if PORT_SUPPORT_DEVICE(0)
|
||||
// P9_5 (GPIO5[18]) (GPIO28 on oem base) as USB connect, active low.
|
||||
Chip_SCU_PinMuxSet(9, 5, SCU_MODE_PULLDOWN | SCU_MODE_FUNC4);
|
||||
Chip_GPIO_SetPinDIROutput(LPC_GPIO_PORT, 5, 18);
|
||||
#if defined(BOARD_TUD_RHPORT) && BOARD_TUD_RHPORT == 0
|
||||
// P9_5 (GPIO5[18]) (GPIO28 on oem base) as USB connect, active low.
|
||||
Chip_SCU_PinMuxSet(9, 5, SCU_MODE_PULLDOWN | SCU_MODE_FUNC4);
|
||||
Chip_GPIO_SetPinDIROutput(LPC_GPIO_PORT, 5, 18);
|
||||
#endif
|
||||
|
||||
// USB1 Power: EA4357 channel A U20 is enabled by SJ5 connected to pad 1-2, no more action required
|
||||
@@ -206,26 +190,12 @@ void board_init(void)
|
||||
//--------------------------------------------------------------------+
|
||||
// USB Interrupt Handler
|
||||
//--------------------------------------------------------------------+
|
||||
void USB0_IRQHandler(void)
|
||||
{
|
||||
#if PORT_SUPPORT_DEVICE(0)
|
||||
tud_int_handler(0);
|
||||
#endif
|
||||
|
||||
#if PORT_SUPPORT_HOST(0)
|
||||
tuh_int_handler(0, true);
|
||||
#endif
|
||||
void USB0_IRQHandler(void) {
|
||||
tusb_int_handler(0, true);
|
||||
}
|
||||
|
||||
void USB1_IRQHandler(void)
|
||||
{
|
||||
#if PORT_SUPPORT_DEVICE(1)
|
||||
tud_int_handler(1);
|
||||
#endif
|
||||
|
||||
#if PORT_SUPPORT_HOST(1)
|
||||
tuh_int_handler(1, true);
|
||||
#endif
|
||||
void USB1_IRQHandler(void) {
|
||||
tusb_int_handler(1, true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
|
@@ -33,18 +33,6 @@
|
||||
#include "bsp/board_api.h"
|
||||
#include "board.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
|
||||
//--------------------------------------------------------------------+
|
||||
@@ -71,11 +59,11 @@
|
||||
// Forward USB interrupt events to TinyUSB IRQ Handler
|
||||
//--------------------------------------------------------------------+
|
||||
void USB0_IRQHandler(void) {
|
||||
tud_int_handler(0);
|
||||
tusb_int_handler(0, true);
|
||||
}
|
||||
|
||||
void USB1_IRQHandler(void) {
|
||||
tud_int_handler(1);
|
||||
tusb_int_handler(1, true);
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
@@ -160,7 +148,7 @@ void board_init(void) {
|
||||
|
||||
#if defined(FSL_FEATURE_SOC_USBHSD_COUNT) && FSL_FEATURE_SOC_USBHSD_COUNT
|
||||
// LPC546xx and LPC540xx has OTG 1 FS + 1 HS rhports
|
||||
#if PORT_SUPPORT_DEVICE(0)
|
||||
#if defined(BOARD_TUD_RHPORT) && BOARD_TUD_RHPORT == 0
|
||||
// Port0 is Full Speed
|
||||
POWER_DisablePD(kPDRUNCFG_PD_USB0_PHY); /*< Turn on USB Phy */
|
||||
CLOCK_SetClkDiv(kCLOCK_DivUsb0Clk, 1, false);
|
||||
@@ -174,7 +162,7 @@ void board_init(void) {
|
||||
CLOCK_EnableUsbfs0DeviceClock(kCLOCK_UsbSrcFro, CLOCK_GetFroHfFreq());
|
||||
#endif
|
||||
|
||||
#if PORT_SUPPORT_DEVICE(1)
|
||||
#if defined(BOARD_TUD_RHPORT) && BOARD_TUD_RHPORT == 1
|
||||
// Port1 is High Speed
|
||||
POWER_DisablePD(kPDRUNCFG_PD_USB1_PHY);
|
||||
|
||||
|
@@ -37,18 +37,6 @@
|
||||
#include "sct_neopixel.h"
|
||||
#endif
|
||||
|
||||
#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
|
||||
//--------------------------------------------------------------------+
|
||||
@@ -73,11 +61,11 @@
|
||||
// Forward USB interrupt events to TinyUSB IRQ Handler
|
||||
//--------------------------------------------------------------------+
|
||||
void USB0_IRQHandler(void) {
|
||||
tud_int_handler(0);
|
||||
tusb_int_handler(0, true);
|
||||
}
|
||||
|
||||
void USB1_IRQHandler(void) {
|
||||
tud_int_handler(1);
|
||||
tusb_int_handler(1, true);
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
@@ -209,7 +197,7 @@ void board_init(void) {
|
||||
/* PORT0 PIN22 configured as USB0_VBUS */
|
||||
IOCON_PinMuxSet(IOCON, 0U, 22U, IOCON_PIO_DIG_FUNC7_EN);
|
||||
|
||||
#if PORT_SUPPORT_DEVICE(0)
|
||||
#if defined(BOARD_TUD_RHPORT) && BOARD_TUD_RHPORT == 0
|
||||
// Port0 is Full Speed
|
||||
|
||||
/* Turn on USB0 Phy */
|
||||
@@ -234,7 +222,7 @@ void board_init(void) {
|
||||
CLOCK_EnableUsbfs0DeviceClock(kCLOCK_UsbfsSrcFro, CLOCK_GetFreq(kCLOCK_FroHf));
|
||||
#endif
|
||||
|
||||
#if PORT_SUPPORT_DEVICE(1)
|
||||
#if defined(BOARD_TUD_RHPORT) && BOARD_TUD_RHPORT == 1
|
||||
// Port1 is High Speed
|
||||
|
||||
/* Turn on USB1 Phy */
|
||||
|
@@ -33,39 +33,23 @@
|
||||
#include "pin_mux.h"
|
||||
#include "clock_config.h"
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// MACRO TYPEDEF CONSTANT ENUM
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
#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
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Forward USB interrupt events to TinyUSB IRQ Handler
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
#if CFG_TUSB_MCU == OPT_MCU_MCXN9
|
||||
void USB0_FS_IRQHandler(void) {
|
||||
tud_int_handler(0);
|
||||
tusb_int_handler(0, true);
|
||||
}
|
||||
|
||||
void USB1_HS_IRQHandler(void) {
|
||||
tud_int_handler(1);
|
||||
tusb_int_handler(1, true);
|
||||
}
|
||||
|
||||
#elif CFG_TUSB_MCU == OPT_MCU_MCXA15
|
||||
|
||||
void USB0_IRQHandler(void) {
|
||||
tud_int_handler(0);
|
||||
tusb_int_handler(0, true);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -133,7 +117,7 @@ void board_init(void) {
|
||||
// USB VBUS
|
||||
/* PORT0 PIN22 configured as USB0_VBUS */
|
||||
|
||||
#if PORT_SUPPORT_DEVICE(0)
|
||||
#if defined(BOARD_TUD_RHPORT) && BOARD_TUD_RHPORT == 0
|
||||
// Port0 is Full Speed
|
||||
|
||||
#if CFG_TUSB_MCU == OPT_MCU_MCXA15
|
||||
@@ -147,7 +131,7 @@ void board_init(void) {
|
||||
CLOCK_EnableUsbfsClock();
|
||||
#endif
|
||||
|
||||
#if PORT_SUPPORT_DEVICE(1) && (CFG_TUSB_MCU == OPT_MCU_MCXN9)
|
||||
#if defined(BOARD_TUD_RHPORT) && BOARD_TUD_RHPORT == 1 && (CFG_TUSB_MCU == OPT_MCU_MCXN9)
|
||||
// Port1 is High Speed
|
||||
|
||||
// Power
|
||||
|
@@ -182,43 +182,19 @@ uint32_t board_millis(void) {
|
||||
// Forward USB interrupt events to TinyUSB IRQ Handler
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
#if CFG_TUD_ENABLED && defined(BOARD_TUD_RHPORT)
|
||||
#define PORT_SUPPORT_DEVICE(_n) (BOARD_TUD_RHPORT == _n)
|
||||
#else
|
||||
#define PORT_SUPPORT_DEVICE(_n) 0
|
||||
#endif
|
||||
|
||||
#if CFG_TUH_ENABLED && defined(BOARD_TUH_RHPORT)
|
||||
#define PORT_SUPPORT_HOST(_n) (BOARD_TUH_RHPORT == _n)
|
||||
#else
|
||||
#define PORT_SUPPORT_HOST(_n) 0
|
||||
#endif
|
||||
|
||||
//------------- USB0 FullSpeed -------------//
|
||||
void usbfs_interrupt_handler(void) {
|
||||
IRQn_Type irq = R_FSP_CurrentIrqGet();
|
||||
R_BSP_IrqStatusClear(irq);
|
||||
|
||||
#if PORT_SUPPORT_HOST(0)
|
||||
tuh_int_handler(0, true);
|
||||
#endif
|
||||
|
||||
#if PORT_SUPPORT_DEVICE(0)
|
||||
tud_int_handler(0);
|
||||
#endif
|
||||
tusb_int_handler(0, true);
|
||||
}
|
||||
|
||||
void usbfs_resume_handler(void) {
|
||||
IRQn_Type irq = R_FSP_CurrentIrqGet();
|
||||
R_BSP_IrqStatusClear(irq);
|
||||
|
||||
#if PORT_SUPPORT_HOST(0)
|
||||
tuh_int_handler(0, true);
|
||||
#endif
|
||||
|
||||
#if PORT_SUPPORT_DEVICE(0)
|
||||
tud_int_handler(0);
|
||||
#endif
|
||||
tusb_int_handler(0, true);
|
||||
}
|
||||
|
||||
void usbfs_d0fifo_handler(void) {
|
||||
@@ -240,13 +216,7 @@ void usbhs_interrupt_handler(void) {
|
||||
IRQn_Type irq = R_FSP_CurrentIrqGet();
|
||||
R_BSP_IrqStatusClear(irq);
|
||||
|
||||
#if PORT_SUPPORT_HOST(1)
|
||||
tuh_int_handler(1, true);
|
||||
#endif
|
||||
|
||||
#if PORT_SUPPORT_DEVICE(1)
|
||||
tud_int_handler(1);
|
||||
#endif
|
||||
tusb_int_handler(1, true);
|
||||
}
|
||||
|
||||
void usbhs_d0fifo_handler(void) {
|
||||
|
@@ -205,7 +205,9 @@ size_t board_get_unique_id(uint8_t id[], size_t max_len) {
|
||||
pico_get_unique_board_id(&pico_id);
|
||||
|
||||
size_t len = PICO_UNIQUE_BOARD_ID_SIZE_BYTES;
|
||||
if (len > max_len) len = max_len;
|
||||
if (len > max_len) {
|
||||
len = max_len;
|
||||
}
|
||||
|
||||
memcpy(id, pico_id.id, len);
|
||||
return len;
|
||||
|
@@ -1,5 +1,6 @@
|
||||
set(MCU_VARIANT stm32f412zx)
|
||||
set(JLINK_DEVICE stm32f412zg)
|
||||
# set(JLINK_OPTION "-USB 000771775987")
|
||||
|
||||
set(LD_FILE_GNU ${CMAKE_CURRENT_LIST_DIR}/STM32F412ZGTx_FLASH.ld)
|
||||
|
||||
|
@@ -32,11 +32,11 @@
|
||||
// Forward USB interrupt events to TinyUSB IRQ Handler
|
||||
//--------------------------------------------------------------------+
|
||||
void OTG_FS_IRQHandler(void) {
|
||||
tud_int_handler(0);
|
||||
tusb_int_handler(0, true);
|
||||
}
|
||||
|
||||
void OTG_HS_IRQHandler(void) {
|
||||
tud_int_handler(1);
|
||||
tusb_int_handler(1, true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
|
@@ -35,23 +35,6 @@ TU_ATTR_UNUSED static void Error_Handler(void) {
|
||||
|
||||
#include "board.h"
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Forward USB interrupt events to TinyUSB IRQ Handler
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
// Despite being call USB2_OTG_FS on some MCUs
|
||||
// OTG_FS is marked as RHPort0 by TinyUSB to be consistent across stm32 port
|
||||
void OTG_FS_IRQHandler(void) {
|
||||
tud_int_handler(0);
|
||||
}
|
||||
|
||||
// Despite being call USB1_OTG_HS on some MCUs
|
||||
// OTG_HS is marked as RHPort1 by TinyUSB to be consistent across stm32 port
|
||||
void OTG_HS_IRQHandler(void) {
|
||||
tud_int_handler(1);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// MACRO TYPEDEF CONSTANT ENUM
|
||||
//--------------------------------------------------------------------+
|
||||
@@ -59,9 +42,21 @@ void OTG_HS_IRQHandler(void) {
|
||||
UART_HandleTypeDef UartHandle;
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
//
|
||||
// Forward USB interrupt events to TinyUSB IRQ Handler
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
// Despite being call USB2_OTG_FS on some MCUs
|
||||
// OTG_FS is marked as RHPort0 by TinyUSB to be consistent across stm32 port
|
||||
void OTG_FS_IRQHandler(void) {
|
||||
tusb_int_handler(0, true);
|
||||
}
|
||||
|
||||
// Despite being call USB1_OTG_HS on some MCUs
|
||||
// OTG_HS is marked as RHPort1 by TinyUSB to be consistent across stm32 port
|
||||
void OTG_HS_IRQHandler(void) {
|
||||
tusb_int_handler(1, true);
|
||||
}
|
||||
|
||||
#ifdef TRACE_ETM
|
||||
void trace_etm_init(void) {
|
||||
// H7 trace pin is PE2 to PE6
|
||||
@@ -111,9 +106,10 @@ void board_init(void) {
|
||||
SysTick->CTRL &= ~1U;
|
||||
|
||||
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
|
||||
#ifdef USB_OTG_FS_PERIPH_BASE
|
||||
#ifdef USB_OTG_FS_PERIPH_BASE
|
||||
NVIC_SetPriority(OTG_FS_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
NVIC_SetPriority(OTG_HS_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );
|
||||
#endif
|
||||
|
||||
@@ -206,13 +202,11 @@ void board_init(void) {
|
||||
struct {
|
||||
GPIO_TypeDef* port;
|
||||
uint32_t pin;
|
||||
} const ulpi_pins[] =
|
||||
{
|
||||
} const ulpi_pins[] = {
|
||||
ULPI_PINS
|
||||
};
|
||||
|
||||
for (uint8_t i=0; i < sizeof(ulpi_pins)/sizeof(ulpi_pins[0]); i++)
|
||||
{
|
||||
for (uint8_t i=0; i < sizeof(ulpi_pins)/sizeof(ulpi_pins[0]); i++) {
|
||||
GPIO_InitStruct.Pin = ulpi_pins[i].pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
|
Reference in New Issue
Block a user