diff options
| author | HiFiPhile <[email protected]> | 2025-09-17 22:45:25 +0200 |
|---|---|---|
| committer | HiFiPhile <[email protected]> | 2025-09-17 22:48:59 +0200 |
| commit | 73f3900b2da5d00e707078a591067f0329118dcb (patch) | |
| tree | 1cfcfed3b7b33cf90dc8c942a47af970fa94d4c0 /src/portable/sunxi | |
| parent | 369a1ff5153a472327d2847c7bc7386309486b34 (diff) | |
Replace old delay functions by tusb_time_delay_ms_api
Signed-off-by: HiFiPhile <[email protected]>
Diffstat (limited to 'src/portable/sunxi')
| -rw-r--r-- | src/portable/sunxi/dcd_sunxi_musb.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/portable/sunxi/dcd_sunxi_musb.c b/src/portable/sunxi/dcd_sunxi_musb.c index 21f13b279..9801a485f 100644 --- a/src/portable/sunxi/dcd_sunxi_musb.c +++ b/src/portable/sunxi/dcd_sunxi_musb.c @@ -99,22 +99,12 @@ static void usb_phy_write(int addr, int data, int len) } } -static void delay_ms(uint32_t ms) -{ -#if CFG_TUSB_OS == OPT_OS_NONE - int now = board_millis(); - while (board_millis() - now <= ms) asm("nop"); -#else - osal_task_delay(ms); -#endif -} - static void USBC_HardwareReset(void) { // Reset phy and controller USBC_REG_set_bit_l(USBPHY_CLK_RST_BIT, USBPHY_CLK_REG); USBC_REG_set_bit_l(BUS_RST_USB_BIT, BUS_CLK_RST_REG); - delay_ms(2); + tusb_time_delay_ms_api(2); USBC_REG_set_bit_l(USBPHY_CLK_GAT_BIT, USBPHY_CLK_REG); USBC_REG_set_bit_l(USBPHY_CLK_RST_BIT, USBPHY_CLK_REG); |
