diff options
| author | copilot-swe-agent[bot] <[email protected]> | 2026-04-23 09:49:02 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-04-23 09:49:02 +0000 |
| commit | 5c0c1662464e48681533e8ecc1217613fb6e3820 (patch) | |
| tree | c3610534cb8307504707bd0c27eab5f461fc863d /src/host | |
| parent | b46147a497bf68d680e9a8a898eeca2d255ce53b (diff) | |
| parent | 1e644339fd984fd6168b8cc09728d3bb56f2eea2 (diff) | |
Merge upstream master into net descriptor-based ep_size branch
- Resolve .gitignore conflict: incorporate upstream's .worktrees entry and
expand dependency path patterns to cover all tools/get_deps.py fetched dirs
(lib/, tools/linkermap, tools/uf2, hw/mcu/*) instead of listing only a few
- Auto-merged upstream changes: build system cleanups, BSP updates,
portability fixes, new boards (nrf54lm20dk, stm32h743_weact),
fatfs relocation, and many other upstream improvements
- Net driver changes (ecm_rndis_device.c, ncm_device.c, net_device.h,
usbd.h, usb_descriptors.c) retain our PR's descriptor-based ep_size
approach as our branch takes precedence
Co-authored-by: HiFiPhile <[email protected]>
Diffstat (limited to 'src/host')
| -rw-r--r-- | src/host/usbh.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/host/usbh.c b/src/host/usbh.c index 75df6bf60..8f80800e9 100644 --- a/src/host/usbh.c +++ b/src/host/usbh.c @@ -374,7 +374,8 @@ bool usbh_defer_func_ms_async(uint32_t ms, tusb_defer_func_t func, uintptr_t par TU_LOG_USBH("USBH schedule function after %u ms\r\n", (unsigned int)ms); _usbh_data.call_after.func = func; _usbh_data.call_after.arg = param; - _usbh_data.call_after.at_ms = tusb_time_millis_api() + ms; + // add one to ensure we wait at least 'ms' milliseconds + _usbh_data.call_after.at_ms = tusb_time_millis_api() + ms + 1; return true; } @@ -610,11 +611,19 @@ bool tuh_task_event_ready(void) { } #if CFG_TUH_HUB - if (!osal_queue_empty(_usbh_daq)) { + if (_usbh_data.enumerating_daddr == TUSB_INDEX_INVALID_8 && + !osal_queue_empty(_usbh_daq)) { return true; } #endif + if (_usbh_data.call_after.func) { + int32_t remain_ms = (int32_t)(_usbh_data.call_after.at_ms - tusb_time_millis_api()); + if (remain_ms <= 0) { + return true; + } + } + return false; } |
