I want to ask if my understanding that the USBD_ITF numbers are NOT what should be passed to the n() functions ITF parameter, and where do I get/generate/determine those interface numbers from?
For the time being I'm just going to guess they're sequential from the ordering of CDC devices within the descriptor configuration returned by tud_descriptor_configuration_cb? Then my next question would be, if the CDC devices are not in strict order, how are they numbered (IE, if the descriptor config has CDC, MSC, MIDI, CDC, MSC, CDC).
This repo is effectively deprecated... we're now using the upstream tinyusb library in pico-sdk, so your question should be asked over there :slightly_smiling_face:
Hello,
I'm trying to implement a tinyusb interface with 3 CDC devices and 1 MSC.
[snips of relevant configs]
I've been using these interface numbers in the first argument to the n function calls and I've been getting crashes, and reviewing the initializer for CDC here https://github.com/raspberrypi/tinyusb/blob/master/src/class/cdc/cdc_device.c#L259 and the usage within _n_read and _n_write here https://github.com/raspberrypi/tinyusb/blob/master/src/class/cdc/cdc_device.c#L169
(backtrace detail)
and finally the dual port example here: https://github.com/raspberrypi/tinyusb/blob/pico/examples/device/cdc_dual_ports/src/main.c#L84
I want to ask if my understanding that the USBD_ITF numbers are NOT what should be passed to the n() functions ITF parameter, and where do I get/generate/determine those interface numbers from?
For the time being I'm just going to guess they're sequential from the ordering of CDC devices within the descriptor configuration returned by tud_descriptor_configuration_cb? Then my next question would be, if the CDC devices are not in strict order, how are they numbered (IE, if the descriptor config has CDC, MSC, MIDI, CDC, MSC, CDC).