summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/bsp/board.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/bsp/board.h b/hw/bsp/board.h
index 6467a5e4f..9c8ec87bc 100644
--- a/hw/bsp/board.h
+++ b/hw/bsp/board.h
@@ -98,7 +98,11 @@ static inline void board_led_off(void)
static inline void board_delay(uint32_t ms)
{
uint32_t start_ms = board_millis();
- while( board_millis() - start_ms < ms) {}
+ while (board_millis() - start_ms < ms)
+ {
+ // take chance to run usb background
+ tud_task();
+ }
}
static inline int8_t board_uart_getchar(void)