diff options
| author | Saulo VerĂssimo <[email protected]> | 2026-03-24 23:38:02 -0300 |
|---|---|---|
| committer | Saulo VerĂssimo <[email protected]> | 2026-05-12 11:07:44 -0300 |
| commit | 7750e51ce1b64bd4d2f0ba6d9671303b96ba80ce (patch) | |
| tree | 9451691d1292c5c31dac155130abc5646c0ef5fc /examples | |
| parent | bc8ce76ae800b312b4d3ef591cc42e8726e68d7f (diff) | |
feat: add MIDI 2.0 Host class driver (USB-MIDI 2.0)
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
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions
