Skip to content

Commit dc52890

Browse files
committed
Update hcd_init() signature. Add osal_task_delay() implementation for none os.
1 parent 6ddab6f commit dc52890

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/portable/wch/hcd_ch32_usbfs.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737
#include "ch32v20x.h"
3838
#include "ch32v20x_usb.h"
3939

40+
void osal_task_delay(uint32_t msec) {
41+
unsigned long start = board_millis();
42+
while (board_millis() - start < msec) {}
43+
}
4044

4145
#define USBFS_RX_BUF_LEN 64
4246
#define USBFS_TX_BUF_LEN 64
@@ -264,9 +268,10 @@ static bool hardware_device_attached(void)
264268
//--------------------------------------------------------------------+
265269
// HCD API
266270
//--------------------------------------------------------------------+
267-
bool hcd_init(uint8_t rhport)
271+
bool hcd_init(uint8_t rhport, const tusb_rhport_init_t* rh_init)
268272
{
269273
(void)rhport;
274+
(void)rh_init;
270275
hardware_init_host(true);
271276

272277
return true;

0 commit comments

Comments
 (0)