<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinyusb.git/src/device, branch dcd_ch32hs_spd</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/tinyusb.git/atom/src/device?h=dcd_ch32hs_spd</id>
<link rel='self' href='http://cgit.235523.xyz/tinyusb.git/atom/src/device?h=dcd_ch32hs_spd'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/'/>
<updated>2026-06-16T10:36:17Z</updated>
<entry>
<title>device: clamp EP0 OUT data copy to the control transfer buffer (#3705)</title>
<updated>2026-06-16T10:36:17Z</updated>
<author>
<name>Ha Thach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-06-16T10:36:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=7b791916a702c28f8f39e9bfc5eb8455d0942865'/>
<id>urn:sha1:7b791916a702c28f8f39e9bfc5eb8455d0942865</id>
<content type='text'>
* device: clamp EP0 OUT data copy to the control transfer buffer

usbd_control_xfer_cb() copied xferred_bytes from the EP0 bounce buffer
into the requester's buffer with no bound. A non-compliant host that
sends an OUT data packet larger than the control transfer's data_len
(= min(len, wLength), the buffer capacity) would overflow that buffer
and over-count total_xferred. Clamp xferred_bytes to the remaining
buffer space before the memcpy and accounting.</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>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 Device 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:37:48Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=bc8ce76ae800b312b4d3ef591cc42e8726e68d7f'/>
<id>urn:sha1:bc8ce76ae800b312b4d3ef591cc42e8726e68d7f</id>
<content type='text'>
Add native USB-MIDI 2.0 Device class driver to TinyUSB. Implements the
USB-MIDI 2.0 specification with both Alt Setting 0 (MIDI 1.0 fallback)
and Alt Setting 1 (UMP native) descriptor support.

Driver features:
- UMP (Universal MIDI Packet) read/write with atomic message framing
- Protocol negotiation: Endpoint Discovery, Config Request/Notify,
  Function Block Discovery (embedded in driver)
- Group Terminal Block descriptor via GET_DESCRIPTOR
- Alt Setting switch handler with endpoint re-arm
- Static allocation, no dynamic memory, ISR-safe

Build system:
- Register midi2d_* in usbd.c driver table
- Add TUD_MIDI2_DESCRIPTOR macros to usbd.h
- Add config defaults (CFG_TUD_MIDI2_*) to tusb_option.h
- Add midi2_ump_word_count() to midi.h (shared by Device and Host)
- Add midi2_device.c/h to family.cmake and CMakeLists.txt
- Add midi2_device.h include to tusb.h

All changes guarded by #if CFG_TUD_MIDI2 (default 0). Zero impact on
existing drivers and examples.

Tested: Raspberry Pi Pico (RP2040), Linux ALSA, Windows MIDI Services
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'tinyusb/master' into ncm_packet_filter</title>
<updated>2026-05-08T11:13:08Z</updated>
<author>
<name>HiFiPhile</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-05-08T11:13:01Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=21fbee1e63e3f756bb991ccb6477ec2b69f53eb8'/>
<id>urn:sha1:21fbee1e63e3f756bb991ccb6477ec2b69f53eb8</id>
<content type='text'>
Signed-off-by: HiFiPhile &lt;admin@hifiphile.com&gt;
</content>
</entry>
<entry>
<title>Merge pull request #3627 from hathach/merge-usbd-control</title>
<updated>2026-05-05T08:08:41Z</updated>
<author>
<name>Ha Thach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-05-05T08:08:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=9b1b781c3efb778d7e631d41e44d36c8ee435906'/>
<id>urn:sha1:9b1b781c3efb778d7e631d41e44d36c8ee435906</id>
<content type='text'>
Refactor USB control transfer handling into `usbd.c`</content>
</entry>
<entry>
<title>fix usbd control to support wLength hack</title>
<updated>2026-05-04T06:39:39Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-05-04T06:39:39Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=e954302c103b4fc6870c6914945e6da1f62f6423'/>
<id>urn:sha1:e954302c103b4fc6870c6914945e6da1f62f6423</id>
<content type='text'>
</content>
</entry>
<entry>
<title>refactor: replace `tu_edpt_state_t` struct with `uint8_t` and update all endpoint state handling methods and accesses</title>
<updated>2026-05-04T05:11:03Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-05-04T04:19:26Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=9d68ed65f7200f155f01416b332c5e9f2340a8b2'/>
<id>urn:sha1:9d68ed65f7200f155f01416b332c5e9f2340a8b2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>refactor `usbd.c`: extract `process_std_device_request` for clarity</title>
<updated>2026-05-04T03:29:29Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-05-04T03:29:29Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=a5e9ce5fbb300702d04c47c7c06436396912d3d6'/>
<id>urn:sha1:a5e9ce5fbb300702d04c47c7c06436396912d3d6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>refactor `usbd.c`: centralize control transfer state management into `_usbd_dev` structure and remove `usbd_control_reset`</title>
<updated>2026-05-04T01:55:08Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-04-29T15:23:32Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=eb66712196b54ff5dcf39df020fb0cad72e853d0'/>
<id>urn:sha1:eb66712196b54ff5dcf39df020fb0cad72e853d0</id>
<content type='text'>
</content>
</entry>
</feed>
