summaryrefslogtreecommitdiff
path: root/src/host
AgeCommit message (Collapse)Author
2026-07-05Fix usbh empty builtin driver warningHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-07-02license: use SPDX identifiers for src/ headers (#3749)Ha Thach
* license: use SPDX identifiers for src/ headers Replace the full ~20-line MIT license boilerplate on every src/ file with a two-line SPDX tag (SPDX-FileCopyrightText + SPDX-License-Identifier), following the REUSE convention used by CircuitPython and the Linux kernel. Removes ~3500 lines of duplicated boilerplate.
2026-06-22Merge remote-tracking branch 'tinyusb/master' into pr-osal-spin-deinitHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-06-22usbh: remove Pico specific commentHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-06-21fix(host): release spinlock in tuh_deinit to fix multi-rebuild panicrenjie
tuh_rhport_init() calls osal_spin_init(&_usbh_spin), which under OPT_OS_PICO claims a hardware spinlock via critical_section_init(). There was no osal_spin_deinit(), so tuh_deinit() never released it: every host init/deinit cycle leaked one spinlock. RP2350 has a small spinlock pool, so a few usb_host rebuilds exhaust it and hw_claim_unused_from_range() panics (the long-standing "crashes on the 4th rebuild" bug). Add osal_spin_deinit() to all OSAL backends (critical_section_deinit for pico; no-op for none/freertos) and call it in tuh_deinit(). Verified 20/20 deinit+rebuild cycles on RP2350-Zero and Waveshare RP2350-USB-A (previously panicked on the 4th). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-01CFG_TUH_CONTROL_PENDING_QUEUE_SZ defefault to 4 if hub is eanbled, 2 if nothathach
2026-05-29Implement asynchronous control transfer queuing for USB host stackhathach
- Added a pending FIFO queue for asynchronous control transfers when the active slot is busy. - Introduced `control_xfer_dispatch_pending` to handle queued transfers on slot availability. - Improved synchronization for blocking and non-blocking transfer modes, preventing deadlocks in RTOS. - Refactored and renamed related functions for clarity and consistency. - Enhanced error handling and callback invocation for failed or stale transfers.
2026-05-12feat: add MIDI 2.0 Host class driver (USB-MIDI 2.0)Saulo Veríssimo
Add native USB-MIDI 2.0 Host class driver to TinyUSB. Implements reactive architecture: enumerate, detect MIDI 2.0 capability, inform application via callbacks. Driver features: - Parse both Alt Setting 0 (MIDI 1.0) and Alt Setting 1 (UMP) - Detect bcdMSC version from descriptor - Auto-select highest protocol (Alt 1 preferred if available) - UMP read/write via endpoint streams - Proper Audio Control interface skip (loop-based, following midi_host.c pattern) - Endpoint open with tuh_edpt_open/tu_edpt_stream_open/clear - usbh_driver_set_config_complete for USBH state machine - Handle Audio Control itf_num in set_config gracefully - 5 weak callback stubs (descriptor, mount, unmount, rx, tx) Build system: - Register midih2_* in usbh.c driver table - Add midi2_host.h include to tusb.h - Add CFG_TUH_MIDI2_LOG_LEVEL to tusb_option.h All changes guarded by #if CFG_TUH_MIDI2 (default 0). Zero impact on existing drivers and examples. Tested: Waveshare RP2350-USB-A (Host) receiving UMP from Raspberry Pi Pico (Device) via PIO-USB, board-to-board
2026-05-04refactor: replace `tu_edpt_state_t` struct with `uint8_t` and update all ↵hathach
endpoint state handling methods and accesses
2026-03-22False negative in tuh_task_event_ready()Cédric Berger
2026-03-22False positive in tuh_task_event_ready()Cédric Berger
2026-03-22We must wait at least the requested amountCédric Berger
2026-03-12refactor(config): separate endpoint buffer sizes into RX and TX definitions ↵hathach
for clarity and flexibility
2026-03-09fix(usbh): correct memcpy usage to ensure proper alignment with `offsetof` ↵hathach
in device descriptor handling
2026-03-09refactor: add desc_device_noheader_t to simplify get device descriptor localhathach
2026-03-09usbh device descriptor validation, also check ep size > 0hathach
2026-03-07open hub mtt interface in 1 callhathach
2026-03-06fix ciHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-03-06usbh: support MTT hubHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-03-04Merge branch 'master' into dwc2_deinithathach
2026-03-02more call_after timeout adjustment with rtoshathach
2026-03-02improve timeout adjustment, exit tuh_task() by timeout_ms = 0hathach
2026-03-02fix call_after timeout adjustment with rtoshathach
2026-03-02- rename to usbh_defer_func_ms_async()hathach
- call after (enum non-blocking delay) also support rtos now
2026-02-28replace board_millis() with tusb_time_millis_api()hathach
2026-02-27add back deferred attachment queue, retry get hub port status if reset ↵hathach
change not set after 20ms
2026-02-27Merge remote-tracking branch 'tinyusb/master' into dwc2_deinitHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-02-26fix fallthroughhathach
2026-02-26revert usbh dedicated queue for attached eventhathach
2026-02-26refactor, rename to schedule function with usbh_call_after_ms() to use with ↵hathach
enumeration delay
2026-02-22Merge branch 'hathach:master' into non-blocking-host-v2Cédric Berger
2026-02-22Apply suggestions from code reviewZixun LI
Co-authored-by: Copilot <[email protected]>
2026-02-20refactor config optionHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-02-19Introduce TUH_CFGID_PHY_SPEED configure optionCédric Berger
2026-02-14add(usbh.c): LOG1 debug message when no address available for hubRoman Leonov
2026-02-11Put deferred attachments in a separate queueCédric Berger
2026-02-11Call continuation functions asynchronouslyCédric Berger
2026-02-11Split functions calling tusb_time_delay_ms_api()Cédric Berger
2026-02-01Actually exit the loop in addition to logging. ENOTENOUGHCOFFEECédric Berger
2026-02-01Limit events processed by tud_task_ext() / tuh_task_ext()Cédric Berger
2026-01-06catch deinit errorHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-01-03fix rusb2 hcd_port_connect_status() using line state, add post root reset ↵hathach
delay for stable speed detection
2025-12-15minor updatehathach
2025-12-15Merge branch 'master' into enum_catchhathach
2025-12-15Merge branch 'refs/heads/master' into enum_catchhathach
2025-12-13Merge branch 'refs/heads/master' into hcd_fsdevhathach
2025-12-11move host hacked bulk mps out of tu_edpt_validate()hathach
2025-12-11refactor usbh_class_driver_t's open() to return number of driver len instead ↵hathach
of bool. help to simplify parsing configuration
2025-11-30Update noteHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-11-27Add max nak configZixun LI
Signed-off-by: Zixun LI <[email protected]>