| Age | Commit message (Collapse) | Author |
|
Resolves all TinyUSB-owned alerts reported by the CI PVS-Studio job
(static_analysis.yml, run with --security-related-issues) on the
raspberry_pi_pico board: 0 remaining in src/ and examples/.
Genuine fixes:
- ncm_device: validate wNdpIndex against sizeof(nth16_t), not the pointer
size sizeof(nth16) (4 bytes) — the latter under-checks the NTB header
(V568).
- tusb: drop the redundant `ff_buf != NULL && ff_bufsize > 0` guard in
tu_edpt_stream_init(); the early return already guarantees it (V560).
- midi_host: bounds-check idx in tuh_midi_itf_get_info() instead of the
always-true `&_midi_host[idx]` pointer (V560).
- examples: fully initialize resolutions_per_format / frame_num /
interval_ms arrays instead of leaving trailing elements implicitly zero
(V1009).
False positives suppressed at the cause:
- usbd/usbh: hide the weak dcd_deinit()/hcd_deinit() stubs from the
analyzer with #ifndef PVS_STUDIO. PVS analyzes one TU at a time and
binds the call to the always-false weak stub (it cannot model the
linker selecting the port's strong definition), then reports the
cleanup loop after TU_ASSERT(...deinit()) as unreachable (V779).
False positives suppressed locally (inline //-V or .pvsconfig):
- .pvsconfig: V501 (HID descriptor macros), V763 (rhport override),
V785 (audio function-index switch), V1044 (hardware poll loops).
- inline //-V for config-dependent or intentional constructs: V512,
V514-style contiguous clears, V547, V557, V560, V614, V619, V641,
V1008, V1037, V1048, V1086.
Verified: all examples build for raspberry_pi_pico; ceedling test:all
passes (60/60); re-run of the CI-exact PVS invocation reports zero
TinyUSB-owned findings.
|
|
|
|
- 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.
|
|
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
|
|
endpoint state handling methods and accesses
|
|
|
|
|
|
|
|
for clarity and flexibility
|
|
in device descriptor handling
|
|
|
|
|
|
|
|
Signed-off-by: HiFiPhile <[email protected]>
|
|
Signed-off-by: HiFiPhile <[email protected]>
|
|
|
|
|
|
|
|
|
|
- call after (enum non-blocking delay) also support rtos now
|
|
|
|
change not set after 20ms
|
|
Signed-off-by: HiFiPhile <[email protected]>
|
|
|
|
|
|
enumeration delay
|
|
|
|
Co-authored-by: Copilot <[email protected]>
|
|
Signed-off-by: HiFiPhile <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: HiFiPhile <[email protected]>
|
|
delay for stable speed detection
|
|
|
|
|
|
|
|
|
|
|
|
of bool. help to simplify parsing configuration
|
|
Signed-off-by: HiFiPhile <[email protected]>
|
|
Signed-off-by: Zixun LI <[email protected]>
|
|
Signed-off-by: HiFiPhile <[email protected]>
|
|
Signed-off-by: HiFiPhile <[email protected]>
|
|
Signed-off-by: HiFiPhile <[email protected]>
|
|
|