adafruit / adafruit/Adafruit_TinyUSB_Arduino

Please allow CFG_TUH_ENUMERATION_BUFSIZE to be configurable from the Arduino GUI or the application

Open
#375 1 comment 0 reactions 0 assignees View on GitHub
Feature
Dominant language
C
Stars
654
Forks
183
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
Someone using the usb_midi_host application host driver+the Adafruit TinyUSB Arduino library is trying to enumerate a device that has an Audio Streaming Interface and a MIDI Streaming Interface. They only want to access the MIDI interface. The USB descriptor for the
device is over 430 bytes long, and so fails to enumerate.

**Describe the solution you'd like**
What I would like is a method to set the number of bytes in the enumeration buffer from the Arduino GUI or from the sketch code.

**Describe alternatives you've considered**
I have considered hacking the port file tusb_config_rp2040.h and hand editing the `CFG_TUH_ENUMERATION_BUFSIZE` value. But
that change goes away every time the library updates.

**Additional context**
This comment is based on Adafruit_TinyUSB_Library 2.4.1 and Earle Philhower Raspberry Pi Pico/RP2040 board package 3.7.0. I imagine this library would have to change first, and then there would need to be a change to the Raspberry Pi Pico/RP2040 board package.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the CFG_TUH_ENUMERATION_BUFSIZE definition in tusb_config_rp2040.h and trace how Adafruit_TinyUSB_Arduino configuration reaches the RP2040 board package. Check the Arduino GUI and sketch configuration paths, then determine how both packages can expose the buffer size. Done means users can set a larger enumeration buffer without editing a port file, allowing the reported descriptor to enumerate.

Written by the indexing model from the issue text.

Assessment

Tech stack
arduino, c
Domain
embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.