TinyUSB Configuration Descriptors

darkgiuseppe
Posts: 26
Joined: Fri Mar 11, 2022 3:57 pm

TinyUSB Configuration Descriptors

Postby darkgiuseppe » Tue Jun 14, 2022 5:02 pm

I have been playing around with the example on how to define a custom descriptor. I have managed to change the Device Descriptor to the info I wanted. Thanks again for this sample code.

However, how do I change the Configuration Descriptor? I see tusb_desc_configuration_t in the tusb_types.h file. When I look here:
https://docs.espressif.com/projects/esp ... evice.html (look under Structures)

I see the tinyusb_config_t struct which is good. I used it to change my string descriptor and the device descriptor. The doc does say there is member for a configuration descriptor. However, when I look inside of tinusb.h, there is no member. Has it been implemented or perhaps moved?


darkgiuseppe
Posts: 26
Joined: Fri Mar 11, 2022 3:57 pm

Re: TinyUSB Configuration Descriptors

Postby darkgiuseppe » Wed Jun 15, 2022 6:00 pm

Perhaps it is over my head but I guess you linking hints to not use the integrated TinyUSB files within the IDF?

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: TinyUSB Configuration Descriptors

Postby chegewara » Wed Jun 15, 2022 9:44 pm

esp-idf USB device is using this tinyusb as component. My link was to show you examples, where you can study how it is done with different descriptors.

darkgiuseppe
Posts: 26
Joined: Fri Mar 11, 2022 3:57 pm

Re: TinyUSB Configuration Descriptors

Postby darkgiuseppe » Wed Jun 15, 2022 9:52 pm

I see. Now this may sound like a silly question but aren't those examples not exactly going to work as it would in the idf? From what I understand it won't be a one to one example and I would have to change some stuff in the tinyusb files within the idf. Sorry if this sound like a dumb question but this is how I interpret it.

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: TinyUSB Configuration Descriptors

Postby chegewara » Wed Jun 15, 2022 10:14 pm

No, most examples wont work 1:1, because its multi architecture library. The easiest to copy/paste are freertos examples, you can find few.

Who is online

Users browsing this forum: No registered users and 117 guests