usbh use the new tusb_time_delay_ms_api()

fix duplicated device attach for some devices which cause "USBH Defer Attach until current enumeration complete"
include dev0 for tuh_edpt_abort_xfer()
This commit is contained in:
hathach
2024-11-04 17:24:49 +07:00
parent 29262f3e24
commit 5f891e020c
3 changed files with 56 additions and 56 deletions

View File

@@ -136,6 +136,6 @@ int board_getchar(void) {
}
uint32_t tusb_time_millis(void) {
uint32_t tusb_time_millis_api(void) {
return board_millis();
}

View File

@@ -173,7 +173,7 @@ void board_init(void) {
#endif // vbus sense
//------------- rhport1: OTG_HS -------------//
#ifdef USB_HS_PHYC
#ifdef USB_HS_PHYC
// MCU with built-in HS PHY such as F723, F733, F730
/* Configure DM DP Pins */
@@ -197,7 +197,7 @@ void board_init(void) {
/* Enable PHYC Clocks */
__HAL_RCC_OTGPHYC_CLK_ENABLE();
#else
#else
// MCU with external ULPI PHY
/* ULPI CLK */
@@ -243,7 +243,7 @@ void board_init(void) {
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Alternate = GPIO_AF10_OTG_HS;
HAL_GPIO_Init(GPIOI, &GPIO_InitStruct);
#endif // USB_HS_PHYC
#endif // USB_HS_PHYC
// Enable USB HS & ULPI Clocks
__HAL_RCC_USB_OTG_HS_ULPI_CLK_ENABLE();