espressif / esp-usb

Other
15 stars 9 forks source link

esp_tinyusb v1.4.4: Adding FS configuration descriptor for HS device #11

Closed roma-jam closed 3 months ago

roma-jam commented 4 months ago

esp_tinyusb v1.4.4 (Release)

General description

Changes

Details

Configuration descriptor definitions:

  1. FS only 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. HS/FS
    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

roma-jam commented 4 months ago

@tore-espressif Thanks for the review! Will follow-up with all suggestions.

tore-espressif commented 4 months ago

@roma-jam Do you think we could increase default debug level to 1 = error in this release? https://github.com/espressif/esp-usb/blob/master/device/esp_tinyusb/Kconfig#L4

// CFG_TUSB_DEBUG for debugging
// 0 : no debug
// 1 : print error
// 2 : print warning
// 3 : print info

cc @peter-marcisovsky

roma-jam commented 4 months ago

@tore-espressif Sure.

Otherwise, shouldn't we turn off the debug at all in the release and implement asserts when we need to use debug error message for that? Anyway, seems that device won't work as expected after that error, so maybe it is better to keep the debug output for debug purpose? WDYT?

roma-jam commented 3 months ago

USB example verification list (ESP-IDF v5.3-dev-2495-g0bbee51829-dirty, esp32p4)