Skip to content

Allow USB Midi descriptor to be changed #11714

@aaronaverill

Description

@aaronaverill

Related area

USBMIDI

Hardware specification

Generic

Is your feature request related to a problem?

The USB device descriptor always shows up as "TinyUSB MIDI", I can't change it

Describe the solution you'd like

Change the literal in this code to a define: USB_MIDI_DESCRIPTOR

https://github.com/espressif/arduino-esp32/blob/master/libraries/USB/src/USBMIDI.cpp#L21

uint8_t str_index = tinyusb_add_string_descriptor(USB_MIDI_DESCRIPTOR);

At the top of the module, add the following block:
#ifndef USB_MIDI_DESCRIPTOR
#define USB_MIDI_DESCRIPTOR "TinyUSB MIDI"
#endif

Now a build define will allow this to be changed so it shows up correctly under the MIDI devices.

Describe alternatives you've considered

This is being called by a library I use, so there is really no way to override the name without a whole bunch of copied code.

Additional context

No response

I have checked existing list of Feature requests and the Contribution Guide

  • I confirm I have checked existing list of Feature requests and Contribution Guide.

Metadata

Metadata

Assignees

Labels

Projects

Status

In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions