_URB_SELECT_CONFIGURATION

Hi,

I have some questions about _URB_SELECT_CONFIGURATION:

  1. ConfigurationDescriptor contains the configuration that we need to select. Is this correct?
  2. Interface contains an array of interface descriptors supported by the configuration. Can there be multiple interfaces here? Will the system set each interface or just the ones changed by the client driver? Changed from the default that is.
  3. I’m confused by the return value for Interface statement:
    “On return from the host controller driver, this member contains a USBD_INTERFACE_INFORMATION structure with data describing the capabilities and format of the endpoints within that interface.”
    Once again will there only be one interface or will this correspond to the interfaces sent in? Do the return values correspond to the values for an interface got by get configuration descriptor?

Thanks,

Kevin.

Kevin wrote:

  1. ConfigurationDescriptor contains the configuration that we need to
    select. Is this correct?

Correct, exactly as you received it in a get_descriptor request.

  1. Interface contains an array of interface descriptors supported by
    the configuration. Can there be multiple interfaces here?

Absolutely. If your configuration contains multiple interfaces, then your interface descriptor array should contain the same number of entries.

Will the system set each interface or just the ones changed by the
client driver? Changed from the default that is.

You should set them all. Although typically, configurations don’t usually have very many interfaces.

  1. I’m confused by the return value for Interface statement:
    “On return from the host controller driver, this member contains a
    USBD_INTERFACE_INFORMATION structure with data describing the
    capabilities and format of the endpoints within that interface.”
    Once again will there only be one interface or will this correspond
    to the interfaces sent in? Do the return values correspond to the values
    for an interface got by get configuration descriptor?

You hand in one USBD_INTERFACE_INFORMATION structure for each interface in your configuration, each of which contains a USBD_PIPE_INFORMATION array large enough to hold each pipe in the alternate setting you chose for that interface. The select_configuration request will then fill in the information in the interface and pipe arrays that you provided.

Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.