temporarily remove osal_task_delay() from osal

- add hcd_uframe_number() API, update EHCI to return uframe number
- get host running on ea4357
This commit is contained in:
hathach
2020-05-04 14:11:58 +07:00
parent 4a3a448340
commit 905a80d1b2
10 changed files with 72 additions and 40 deletions

View File

@@ -127,6 +127,15 @@ tusb_device_state_t tuh_device_get_state (uint8_t const dev_addr)
return (tusb_device_state_t) _usbh_devices[dev_addr].state;
}
static inline void osal_task_delay(uint32_t msec)
{
(void) msec;
uint32_t start = hcd_frame_number(TUH_OPT_RHPORT);
while ( ( hcd_frame_number(TUH_OPT_RHPORT) - start ) < msec ) {}
}
//--------------------------------------------------------------------+
// CLASS-USBD API (don't require to verify parameters)
//--------------------------------------------------------------------+