Skip to content

Commit 0dd9061

Browse files
committed
cherryusb:Adapt the usbd_kinetis_delay_ms interface in usb_glue_mcx.
1 parent 258395a commit 0dd9061

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

components/drivers/usb/cherryusb/port/kinetis/usb_glue_mcx.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,12 @@ void usb_dc_low_level_deinit(uint8_t busid)
8282

8383
void usbd_kinetis_delay_ms(uint8_t ms)
8484
{
85+
#ifdef __RTTHREAD__
86+
rt_thread_mdelay(ms);
87+
#else
88+
for (uint32_t i = 0; i < ms; i++)
89+
{
90+
for (volatile uint32_t j = 0; j < 10000; j++);
91+
}
92+
#endif
8593
}

0 commit comments

Comments
 (0)