<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinyusb.git/src/class/midi/midi2_device.c, branch 0.21.0</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_device.c?h=0.21.0</id>
<link rel='self' href='http://cgit.235523.xyz/tinyusb.git/atom/src/class/midi/midi2_device.c?h=0.21.0'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/'/>
<updated>2026-05-18T21:07:49Z</updated>
<entry>
<title>midi2: convert to raw Tx FIFO for better segmentation handling, add count to packet api</title>
<updated>2026-05-18T21:07:49Z</updated>
<author>
<name>HiFiPhile</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-05-18T21:07:49Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=4baf1883c194c2c4b6fa30cc0c443ad6c83e0b19'/>
<id>urn:sha1:4baf1883c194c2c4b6fa30cc0c443ad6c83e0b19</id>
<content type='text'>
Signed-off-by: HiFiPhile &lt;admin@hifiphile.com&gt;
</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: per-interface weak callbacks for UMP Stream config</title>
<updated>2026-05-17T15:19:45Z</updated>
<author>
<name>Saulo Veríssimo</name>
<email>sauloverissimo@gmail.com</email>
</author>
<published>2026-05-17T15:19:45Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=4b729bfb9274af44f8edfba2134893a6889cfd03'/>
<id>urn:sha1:4b729bfb9274af44f8edfba2134893a6889cfd03</id>
<content type='text'>
Lets each instance return different NUM_GROUPS, NUM_FUNCTION_BLOCKS,
EP_NAME and PRODUCT_ID. Defaults fall back to the macros.
</content>
</entry>
<entry>
<title>midi2: peek 4 bytes for MT, restore 256 buffers</title>
<updated>2026-05-17T14:31:12Z</updated>
<author>
<name>Saulo Veríssimo</name>
<email>sauloverissimo@gmail.com</email>
</author>
<published>2026-05-17T14:31:12Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=5ac6346dd4980af75973e53dd130e7ee2a9af32d'/>
<id>urn:sha1:5ac6346dd4980af75973e53dd130e7ee2a9af32d</id>
<content type='text'>
MT is in byte 3 of the UMP word in LE memory, not byte 0. Buffers
at mps blocked RX xfer re-arm on partial packets.
</content>
</entry>
<entry>
<title>midi2: use hwfifo if supported</title>
<updated>2026-05-17T12:35:34Z</updated>
<author>
<name>HiFiPhile</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-05-17T12:35:34Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=e00ac15b7f31be28ff888a5220cbde93a61c17f4'/>
<id>urn:sha1:e00ac15b7f31be28ff888a5220cbde93a61c17f4</id>
<content type='text'>
Signed-off-by: HiFiPhile &lt;admin@hifiphile.com&gt;
</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: reject UMP read/write API on alt setting 0</title>
<updated>2026-05-16T15:59:03Z</updated>
<author>
<name>Saulo Veríssimo</name>
<email>sauloverissimo@gmail.com</email>
</author>
<published>2026-05-16T15:59:03Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=0af0665ed65ef9574a4c3c2da83c1c502cb713de'/>
<id>urn:sha1:0af0665ed65ef9574a4c3c2da83c1c502cb713de</id>
<content type='text'>
Alt 0 carries USB-MIDI 1.0 32-bit Event Packets, not UMP words; calling
the UMP API there would misinterpret the stream. Expose MIDI_PROTOCOL_MIDI1
and MIDI_PROTOCOL_MIDI2 in the public header so applications can branch on
the negotiated protocol.

Ref #3571
</content>
</entry>
<entry>
<title>midi2: align descriptors with USB-MIDI 2.0 spec</title>
<updated>2026-05-12T14:07:45Z</updated>
<author>
<name>Saulo Veríssimo</name>
<email>sauloverissimo@gmail.com</email>
</author>
<published>2026-04-22T21:04:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=97852816e873bf7f91f3a81f093ad08f96179656'/>
<id>urn:sha1:97852816e873bf7f91f3a81f093ad08f96179656</id>
<content type='text'>
Brings the MIDI 2.0 device driver into full conformance with USB
Device Class Definition for MIDI Devices v2.0 (USB-IF, May 2020).

- Alt 1 MS Interface Header wTotalLength now reports 0x0007 per
  Table 5-2 ("set to match bLength"), replacing the prior 0x0011
  carried over from USB-MIDI 1.0 conventions.
- GET_DESCRIPTOR class request now validates bmRequestType direction,
  type and recipient plus wIndex and wValue high byte per Section 6.
- iBlockItem in the default Group Terminal Block is driven by
  CFG_TUD_MIDI2_BLOCK_STRIDX so applications can attach a UI string
  descriptor to the block per Table 5-6.
- UMP word byte order assumption (little-endian host per Section
  3.2.2) is documented inline so future big-endian ports know where
  to wrap access with tu_htole32 / tu_le32toh.

Validated on RP2040 and ESP32-P4 under Linux kernel 6.17: lsusb -v
reports wTotalLength = 0x0007 on Alt 1 MS Header (raw bytes
07 24 01 00 02 07 00). amidi -l enumerates Group Terminals exposed
via the class-specific GET_DESCRIPTOR response.
</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: CI build failures on non-RP2040 platforms</title>
<updated>2026-05-12T14:07:44Z</updated>
<author>
<name>Saulo Veríssimo</name>
<email>sauloverissimo@gmail.com</email>
</author>
<published>2026-03-25T10:29:10Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=f8a5fc37f3472cb2e3eb584d58e9cf4588dc4329'/>
<id>urn:sha1:f8a5fc37f3472cb2e3eb584d58e9cf4588dc4329</id>
<content type='text'>
- Use UINT32_C(1) instead of 1u for bit shifts &gt;= 16 in
  midi2_device.c to avoid shift-count-overflow on 16-bit
  platforms (MSP430)
- Add Makefiles for midi2_device and midi2_host examples with
  family guard (skip if FAMILY != rp2040). These examples
  require Pico SDK and board-specific hardware
- Restrict midi2_device CMakeLists.txt to rp2040 family
  (matching midi2_host)
</content>
</entry>
</feed>
