-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
esp_tinyusb v1.4.4: Adding FS configuration descriptor for HS device #11
Conversation
73788f7
to
681ddf1
Compare
91da76e
to
5dede2c
Compare
77cac3e
to
672da25
Compare
55b1332
to
e379750
Compare
1325870
to
d0b5b2e
Compare
7416511
to
4168b9e
Compare
281383a
to
2e21557
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@roma-jam Thanks for the updates.
My biggest concern is about memory allocation for the descriptors. Previously, if user did not provide his own descriptors, all Kconfig generated descs were statically allocated in esp_tinyusb.
If user provided his descs, he was responsible for making sure that their lifetime is the same as the lifetime of the USB device (usually made static
).
This is surely not the best solutions, but it is consistent across the whole esp_tinyusb
component and also consistent with TinyUSB upstream examples.
@tore-espressif Thanks for the review! |
80d5db2
to
b0945a4
Compare
@roma-jam Do you think we could increase default debug level to 1 = error in this release? // CFG_TUSB_DEBUG for debugging
// 0 : no debug
// 1 : print error
// 2 : print warning
// 3 : print info |
caa144a
to
a23f959
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @roma-jam , looks better now!
76e84c6
to
024da71
Compare
a8e14d1
to
7a6e7a3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7a6e7a3
to
0265367
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@roma-jam Left a bunch of nitpicks, but changes LGTM overall
9d3df2d
to
3c51edf
Compare
USB example verification list (ESP-IDF v5.3-dev-2495-g0bbee51829-dirty, esp32p4)
|
0a53965
to
40a009d
Compare
Added union in tinyusb configuration for configuration descriptor pointer Moved selecting user-defined or default descriptor based on tinyusb configuration to descriptors_control Changed default Kconfig level to 1
40a009d
to
8ea55b6
Compare
esp_tinyusb v1.4.4 (Release)
General description
Changes
descriptor_control.c
file,tinyusb_set_descriptors(..)
. This function is responsible for descriptors preparation based on the tinyusb configuration, provided during tinyusb driver install.*_kconfig
to*_default
.descriptor_hs_cfg_default[]
for HighSpeed device anddescriptor_hs_cfg_default[]
for FullSpeed device..hs_cfg_desc
field to tinyusb configuration (only whenTUD_OPT_HIGH_SPEED
is set).qualifier_desc
field to tinyusb configuration (only whenTUD_OPT_HIGH_SPEED
is set)Details
Configuration descriptor definitions:
1.1 Configuration descriptor NOT present (
.configuration_descriptor = NULL
). Default FS compatible configuration descriptor is using.1.2 Configuration descriptor PRESENT (
.configuration_descriptor != NULL
). Provided descriptor is using.2.1 Configuration descriptor NOT present (
.configuration_descriptor = NULL
). Default FS compatible configuration descriptor is using.2.2 HS configuration descriptor NOT present (
.hs_cfg_desc = NULL
). Default HS compatible configuration descriptor is using.2.3 Configuration descriptor PRESENT (
.configuration_descriptor != NULL
). Provided FS descriptor is using.2.4 HS configuration descriptor PRESENT (
.hs_cfg_desc != NULL
). Provided HS descriptor is using.IMPORTANT: In any cases for HS/FS, configuration descriptors must be equal size.
Hints
.fs_cfg_desc
might be used instead of.configuration_descriptor