فهرست منبع

usb_host: Update docs and comments regarding first configuration enumeration

This commit updates some comments and documentation regarding changes made in
PR https://github.com/espressif/esp-idf/pull/11113.
Darian Leung 2 سال پیش
والد
کامیت
525de5bd21
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      components/usb/hub.c
  2. 1 1
      docs/en/api-reference/peripherals/usb_host.rst

+ 1 - 1
components/usb/hub.c

@@ -36,7 +36,7 @@ implement the bare minimum to control the root HCD port.
 
 #define ENUM_CTRL_TRANSFER_MAX_DATA_LEN             CONFIG_USB_HOST_CONTROL_TRANSFER_MAX_SIZE
 #define ENUM_DEV_ADDR                               1       //Device address used in enumeration
-#define ENUM_CONFIG_INDEX                           0       //Index of the first configuration of the device
+#define ENUM_CONFIG_INDEX                           0       //Index used to get the first configuration descriptor of the device
 #define ENUM_SHORT_DESC_REQ_LEN                     8       //Number of bytes to request when getting a short descriptor (just enough to get bMaxPacketSize0 or wTotalLength)
 #define ENUM_WORST_CASE_MPS_LS                      8       //The worst case MPS of EP0 for a LS device
 #define ENUM_WORST_CASE_MPS_FS                      64      //The worst case MPS of EP0 for a FS device

+ 1 - 1
docs/en/api-reference/peripherals/usb_host.rst

@@ -86,7 +86,7 @@ Therefore, in addition to the client tasks, the Host Library also requires a tas
 Devices
 ^^^^^^^
 
-The Host Library hides the details of device handling (such as connection, memory allocation, and enumeration) from the clients. The clients are provided only with a list of already connected and enumerated devices to choose from. During enumeration, each device is configured to use configuration 1.
+The Host Library hides the details of device handling (such as connection, memory allocation, and enumeration) from the clients. The clients are provided only with a list of already connected and enumerated devices to choose from. During enumeration, each device is automatically configured to use the first configuration found (i.e., the first configuration descriptor returned on a Get Configuration Descriptor request). For most standard devices, the first configuration will have a ``bConfigurationValue`` of ``1``.
 
 It is possible for a two or more clients to simultaneously communicate with the same device as long as they are not communicating to the same interface. However, multiple clients can simultaneously communicate with the same device's default endpoint (EP0), which will result in their control transfers being serialized.