mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-22 10:20:55 +00:00
Merge pull request #2093 from abakosh/no_osal_delay
osal_none: make it possible to override the task delay function
This commit is contained in:
commit
ce54984556
@ -258,7 +258,7 @@ static bool usbh_control_xfer_cb (uint8_t daddr, uint8_t ep_addr, xfer_result_t
|
|||||||
|
|
||||||
#if CFG_TUSB_OS == OPT_OS_NONE
|
#if CFG_TUSB_OS == OPT_OS_NONE
|
||||||
// TODO rework time-related function later
|
// TODO rework time-related function later
|
||||||
void osal_task_delay(uint32_t msec)
|
TU_ATTR_WEAK void osal_task_delay(uint32_t msec)
|
||||||
{
|
{
|
||||||
const uint32_t start = hcd_frame_number(_usbh_controller);
|
const uint32_t start = hcd_frame_number(_usbh_controller);
|
||||||
while ( ( hcd_frame_number(_usbh_controller) - start ) < msec ) {}
|
while ( ( hcd_frame_number(_usbh_controller) - start ) < msec ) {}
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
#if CFG_TUH_ENABLED
|
#if CFG_TUH_ENABLED
|
||||||
// currently only needed/available in host mode
|
// currently only needed/available in host mode
|
||||||
void osal_task_delay(uint32_t msec);
|
TU_ATTR_WEAK void osal_task_delay(uint32_t msec);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
|
Loading…
x
Reference in New Issue
Block a user