<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinyusb.git/src/class/midi/midi2_host.c, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/tinyusb.git/atom/src/class/midi/midi2_host.c?h=master</id>
<link rel='self' href='http://cgit.235523.xyz/tinyusb.git/atom/src/class/midi/midi2_host.c?h=master'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/'/>
<updated>2026-07-02T14:55:45Z</updated>
<entry>
<title>license: use SPDX identifiers for src/ headers (#3749)</title>
<updated>2026-07-02T14:55:45Z</updated>
<author>
<name>Ha Thach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-02T14:55:45Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=7a4111b96ef6279e75579f9a18443834f6a0871d'/>
<id>urn:sha1:7a4111b96ef6279e75579f9a18443834f6a0871d</id>
<content type='text'>
* 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.</content>
</entry>
<entry>
<title>midi2_host: convert TX to raw FIFO mirroring midi2_device refactor</title>
<updated>2026-05-19T19:34:42Z</updated>
<author>
<name>Saulo Veríssimo</name>
<email>sauloverissimo@gmail.com</email>
</author>
<published>2026-05-19T19:34:42Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=dad8c0ae51d68fd5355a8a0de4e478e4149ec05e'/>
<id>urn:sha1:dad8c0ae51d68fd5355a8a0de4e478e4149ec05e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>midi2: boundary-aware drain in xfer_cb to keep UMP packets intact</title>
<updated>2026-05-18T14:42:34Z</updated>
<author>
<name>Saulo Veríssimo</name>
<email>sauloverissimo@gmail.com</email>
</author>
<published>2026-05-18T14:42:34Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=aaca323bd34945178e88de51acf67c4d0443a726'/>
<id>urn:sha1:aaca323bd34945178e88de51acf67c4d0443a726</id>
<content type='text'>
</content>
</entry>
<entry>
<title>midi2: prevent UMP packet split across USB transfers</title>
<updated>2026-05-16T15:59:44Z</updated>
<author>
<name>Saulo Veríssimo</name>
<email>sauloverissimo@gmail.com</email>
</author>
<published>2026-05-16T15:59:44Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=840f3e0a628e69a2b7fb4136b2dca8ab5b350f83'/>
<id>urn:sha1:840f3e0a628e69a2b7fb4136b2dca8ab5b350f83</id>
<content type='text'>
The edpt_stream auto-flush is byte-oriented and could cut an UMP message
in half when the FIFO reached wMaxPacketSize, corrupting the peer's RX
context. Pre-flush whole packets before writing one that would cross the
boundary on both device (tud_midi2_n_ump_write) and host
(tuh_midi2_ump_write) paths. Host write also becomes packet-aware
instead of word-by-word.

Ref #3571
</content>
</entry>
<entry>
<title>midi2: align ep_buf allocation with other stream-based classes</title>
<updated>2026-05-12T14:07:45Z</updated>
<author>
<name>Saulo Veríssimo</name>
<email>sauloverissimo@gmail.com</email>
</author>
<published>2026-04-21T23:42:24Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=0c68ca8c1de45e24ae022ab58934c6930bad7b4b'/>
<id>urn:sha1:0c68ca8c1de45e24ae022ab58934c6930bad7b4b</id>
<content type='text'>
Keep the MIDI 2.0 drivers fully self-contained, with no changes to
shared or generic stack code.

Allocate the per-endpoint buffer in both midi2_host and midi2_device,
following the convention used by cdc, midi, vendor, and printer.

The class buffer struct is declared unconditionally and passed to
tu_edpt_stream_init on every init, so the streaming helpers operate
on the same shape across all classes.
</content>
</entry>
<entry>
<title>fix: address PR review feedback for MIDI 2.0 drivers</title>
<updated>2026-05-12T14:07:44Z</updated>
<author>
<name>Saulo Veríssimo</name>
<email>sauloverissimo@gmail.com</email>
</author>
<published>2026-03-25T10:05:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=fa9edeff9c00ee1fc4ee7ab9938b1a5955a6281a'/>
<id>urn:sha1:fa9edeff9c00ee1fc4ee7ab9938b1a5955a6281a</id>
<content type='text'>
Host driver (midi2_host.c):
- midih2_open() now returns actual parsed length instead of max_len,
  preventing composite device interface conflicts
- Parsers (alt0/alt1) refactored to return const uint8_t* end pointer
  following midi_host.c switch/case pattern
- Alt 1 CS Endpoint now parses MIDI 2.0 layout (bNumGrpTrmBlk at
  offset 3 with MIDI_CS_ENDPOINT_GENERAL_2_0 subtype check) instead
  of reusing MIDI 1.0 struct (bNumEmbMIDIJack)
- midih2_set_config() now issues SET_INTERFACE control request via
  tuh_interface_set() before completing configuration. Falls back to
  alt 0 if SET_INTERFACE fails
- Extracted midih2_set_config_complete() and midih2_set_interface_cb()
  for async SET_INTERFACE handling

Device driver (midi2_device.c):
- midi2d_open() skip loop now checks bInterfaceNumber, stopping at
  interfaces that belong to other functions in composite devices
- SET_INTERFACE handler now rejects alt &gt; 1 (returns false/stall)
- Named constants for GTB descriptor types and MIDI protocol values

Descriptor macros (usbd.h):
- TUD_MIDI2_DESC_ALT1_HEAD: iInterface set to 0 (consistent with
  Alt 0), wTotalLength now uses TUD_MIDI2_DESC_ALT1_CS_LEN to cover
  all Alt 1 class-specific descriptors
- TUD_MIDI2_DESC_ALT1_EP: now accepts GTB ID list via variadic args,
  emitting complete CS endpoint descriptor

Host example:
- CMakeLists.txt restricted to rp2040 family (display.c requires
  Pico SDK headers)
- display.c: null terminator after strncpy in log scroll

Documentation:
- class_drivers.rst updated to reflect SET_INTERFACE behavior and
  auto-select with fallback

Addresses: Codex P1 (#1, #2, #3), Copilot (#4-#9)
</content>
</entry>
<entry>
<title>feat: add MIDI 2.0 Host class driver (USB-MIDI 2.0)</title>
<updated>2026-05-12T14:07:44Z</updated>
<author>
<name>Saulo Veríssimo</name>
<email>sauloverissimo@gmail.com</email>
</author>
<published>2026-03-25T02:38:02Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=7750e51ce1b64bd4d2f0ba6d9671303b96ba80ce'/>
<id>urn:sha1:7750e51ce1b64bd4d2f0ba6d9671303b96ba80ce</id>
<content type='text'>
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
</content>
</entry>
</feed>
