Open Flamabalistic opened 1 month ago
hello @Flamabalistic thank you for the report.
You're right that the PID will mix MSC in this case. This code is taken from upstream tinyusb, for example here https://github.com/hathach/tinyusb/blob/master/examples/device/cdc_dual_ports/src/usb_descriptors.c#L35
Do you face any specific issues with this setup? If this is really a problem we can fix it in upstream TinyUSB and then fix it on our side too, just keep consistent behaviour
It could potentially cause issues with an incorrecy driver loading AFAIK - however as it's possible to overwrite the default PID, it's no big deal.
NOTE: For anyone who needs it, custom PIDs can be set in tinyusb_config_t.device_descriptor
Answers checklist.
Which component are you using? If you choose Other, provide details in More Information.
device/esp_tinyusb
ESP-IDF version.
v5.3-dev-1353-gb3f7e2c8a4
Development Kit.
ESP32-S3-DevKitC-1
Used Component version.
1.4.4
More Information.
When acting as multiple CDC devices, the PID of the devices are misconfigured.
Instead of having PID 0x4001, as expected for a CDC device, they both instead have PID 0x4002, the PID of an MSC device.
I believe this is due to an error in
usb_descriptors.c
, asCFG_TUD_CDC
is the number of CDC devices, not a flag as the code assumes. (The same goes with HID, and MIDI as seen intusb_config.h
To fix:
should be