diff options
| author | verylowfreq <[email protected]> | 2024-12-12 09:53:58 +0900 |
|---|---|---|
| committer | verylowfreq <[email protected]> | 2025-03-16 10:13:26 +0900 |
| commit | 9ca4bc89a7e285796e8102eb7a8fd1bbc6fb9938 (patch) | |
| tree | b00bbeebc736ad826712819ab0857df9613b04b9 | |
| parent | 426588d947b5c9ac789571019fc2b8da5d756669 (diff) | |
Update hcd_init() signature. Add osal_task_delay() implementation for none os.
| -rw-r--r-- | src/portable/wch/hcd_ch32_usbfs.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/portable/wch/hcd_ch32_usbfs.c b/src/portable/wch/hcd_ch32_usbfs.c index ddd366b4f..cbbf90da6 100644 --- a/src/portable/wch/hcd_ch32_usbfs.c +++ b/src/portable/wch/hcd_ch32_usbfs.c @@ -37,6 +37,10 @@ #include "ch32v20x.h" #include "ch32v20x_usb.h" +void osal_task_delay(uint32_t msec) { + unsigned long start = board_millis(); + while (board_millis() - start < msec) {} +} #define USBFS_RX_BUF_LEN 64 #define USBFS_TX_BUF_LEN 64 @@ -264,9 +268,10 @@ static bool hardware_device_attached(void) //--------------------------------------------------------------------+ // HCD API //--------------------------------------------------------------------+ -bool hcd_init(uint8_t rhport) +bool hcd_init(uint8_t rhport, const tusb_rhport_init_t* rh_init) { (void)rhport; + (void)rh_init; hardware_init_host(true); return true; |
