Skip to content

Commit 3fdd2a4

Browse files
author
Aladdin Bakosh
committed
osal_none: make it possible to override the task delay function
1 parent 973c7d4 commit 3fdd2a4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/host/usbh.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ static bool usbh_control_xfer_cb (uint8_t daddr, uint8_t ep_addr, xfer_result_t
256256

257257
#if CFG_TUSB_OS == OPT_OS_NONE
258258
// TODO rework time-related function later
259-
void osal_task_delay(uint32_t msec)
259+
TU_ATTR_WEAK void osal_task_delay(uint32_t msec)
260260
{
261261
const uint32_t start = hcd_frame_number(_usbh_controller);
262262
while ( ( hcd_frame_number(_usbh_controller) - start ) < msec ) {}

src/osal/osal_none.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
#if CFG_TUH_ENABLED
3939
// currently only needed/available in host mode
40-
void osal_task_delay(uint32_t msec);
40+
TU_ATTR_WEAK void osal_task_delay(uint32_t msec);
4141
#endif
4242

4343
//--------------------------------------------------------------------+

0 commit comments

Comments
 (0)