<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinyusb.git/src/device, branch claude/adoring-pasteur-kbaFa</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/tinyusb.git/atom/src/device?h=claude%2Fadoring-pasteur-kbaFa</id>
<link rel='self' href='http://cgit.235523.xyz/tinyusb.git/atom/src/device?h=claude%2Fadoring-pasteur-kbaFa'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/'/>
<updated>2026-06-12T02:46:03Z</updated>
<entry>
<title>usbd: use _usbd_rhport directly instead of rewriting the rhport parameter</title>
<updated>2026-06-12T02:46:03Z</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-06-12T02:46:03Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=cf2f60526c2d38078e0e638f513fad85a801d379'/>
<id>urn:sha1:cf2f60526c2d38078e0e638f513fad85a801d379</id>
<content type='text'>
Replace the `rhport = _usbd_rhport;` parameter-rewrite pattern in the
9 usbd_edpt_*/usbd_sof_enable functions with `(void) rhport;` and pass
_usbd_rhport directly to the dcd_* calls, matching the existing style of
usbd_edpt_claim/release/busy/stalled. This resolves PVS-Studio V763
(parameter always rewritten before use) properly, so drop the global
//-V::763 suppression from .pvsconfig.

Verified: pico examples rebuild, ceedling test:all 60/60, CI-exact PVS
re-run reports zero TinyUSB-owned findings with the suppression removed.
</content>
</entry>
<entry>
<title>clean up PVS-Studio static-analysis findings for raspberry_pi_pico</title>
<updated>2026-06-11T23:34:30Z</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-06-11T23:34:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=72f4d52aafaf582a29428863a72c454a9ae5e916'/>
<id>urn:sha1:72f4d52aafaf582a29428863a72c454a9ae5e916</id>
<content type='text'>
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 &amp;&amp; ff_bufsize &gt; 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 `&amp;_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.
</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>
</feed>
