Skip to content

Commit ce54984

Browse files
authored
Merge pull request hathach#2093 from abakosh/no_osal_delay
osal_none: make it possible to override the task delay function
2 parents db59494 + 3fdd2a4 commit ce54984

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
@@ -258,7 +258,7 @@ static bool usbh_control_xfer_cb (uint8_t daddr, uint8_t ep_addr, xfer_result_t
258258

259259
#if CFG_TUSB_OS == OPT_OS_NONE
260260
// TODO rework time-related function later
261-
void osal_task_delay(uint32_t msec)
261+
TU_ATTR_WEAK void osal_task_delay(uint32_t msec)
262262
{
263263
const uint32_t start = hcd_frame_number(_usbh_controller);
264264
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)