diff options
| author | hathach <[email protected]> | 2019-05-29 16:55:54 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2019-05-29 16:55:54 +0700 |
| commit | a619511631ea3ece5d419c5503b26d973c7016fa (patch) | |
| tree | 31b636f2a43db9a29b65ba26b58cb0be3e15554d | |
| parent | a0307bafdaa97628bb5e4d5e476db54cbc028d33 (diff) | |
run tud_task() in board_delay()
| -rw-r--r-- | hw/bsp/board.h | 6 |
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) |
