The configuration descriptor describes information about a specific device configuration. The descriptor contains a bConfigurationValue field with a value that, when used as a parameter to the SetConfiguration() request, causes the device to assume the described configuration.
配置描述符描述了特定设备配置的相关信息。该描述符包含一个 bConfigurationValue 字段,当该值作为 SetConfiguration() 请求的参数使用时,会使设备采用所描述的配置。
The descriptor describes the number of interfaces provided by the configuration. Each interface may operate independently. For example, an ISDN device might be configured with two interfaces, each providing 64kB/s bi-directional channels that have separate data sources or sinks on the host. Another configuration might present the ISDN device as a single interface, bonding the two channels into one 128kB/s bi-directional channel.
该描述符描述了此配置所提供的接口数量。每个接口可以独立运行。例如,一个 ISDN 设备可能被配置为具有两个接口,每个接口提供 64kB/s 的双向通道,这些通道在主机上具有独立的数据源或接收器。另一种配置可能将 ISDN 设备呈现为单个接口,将两个通道绑定为一个 128kB/s 的双向通道。
When the host requests the configuration descriptor, all related interface and endpoint descriptors are returned (refer to Section 9.4.2).
当主机请求 配置描述符 时,所有相关的接口和端点描述符都会被返回(参见第 9.4.2 节)。
A USB device has one or more configuration descriptors. Each configuration has one or more interfaces and each interface has zero or more endpoints. An endpoint is not shared among interfaces within a single configuration unless the endpoint is used by alternate settings of the same interface. Endpoints may be shared among interfaces that are part of different configurations without this restriction.
一个 USB 设备拥有一个或多个配置描述符。每个配置拥有一个或多个接口,每个接口拥有零个或多个端点。端点不能在同一配置内的多个接口之间共享,除非该端点被同一接口的备用设置所使用。端点可以在属于不同配置的接口之间共享,不受此限制。
Once configured, devices may support limited adjustments to the configuration. If a particular interface has alternate settings, an alternate may be selected after configuration. Table 9-8 shows the standard configuration descriptor.
一旦配置完成,设备可能支持对配置进行有限的调整。如果某个特定接口有备用设置,则可以在配置之后选择备用设置。表 9-8 显示了标准的配置描述符。
