diff options
| author | Yunhao Tian <[email protected]> | 2021-12-04 18:02:07 +0800 |
|---|---|---|
| committer | Yunhao Tian <[email protected]> | 2021-12-04 18:02:07 +0800 |
| commit | 68ca62dfd7e7fe757ba436fee7721520119da92b (patch) | |
| tree | 62089abe09894d0824fa22837b2a86f1b1dfb0c5 /src | |
| parent | dff54d854ddae3ff5c8dc81bac77fd8b50564598 (diff) | |
Add BSP support for F1C100s
Diffstat (limited to 'src')
| -rw-r--r-- | src/portable/sunxi/dcd_sunxi_musb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/portable/sunxi/dcd_sunxi_musb.c b/src/portable/sunxi/dcd_sunxi_musb.c index b13842de1..71d0b92b2 100644 --- a/src/portable/sunxi/dcd_sunxi_musb.c +++ b/src/portable/sunxi/dcd_sunxi_musb.c @@ -4,6 +4,7 @@ #include <f1c100s-irq.h> #include <device/dcd.h> #include "musb_def.h" +#include "bsp/board.h" typedef uint32_t u32; typedef uint16_t u16; @@ -69,8 +70,8 @@ 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 cnt = ms * 1000 * 1000 / 2; - while (cnt--) asm("nop"); + int now = board_millis(); + while (board_millis() - now <= ms) asm("nop"); #else osal_task_delay(ms); #endif |
