URB
Expand Minimize

_URB_SELECT_INTERFACE structure

The _URB_SELECT_INTERFACE structure is used by USB client drivers to select an alternate setting for an interface or to change the maximum packet size of a pipe in the current configuration on a USB device.

Syntax


struct _URB_SELECT_INTERFACE {
  struct URB_HEADER  Hdr;
  USBD_CONFIGURATION_HANDLE  ConfigurationHandle;
  USBD_INTERFACE_INFORMATION Interface;
};

Members

Hdr

Pointer to a _URB_HEADER structure that specifies the URB header information. Hdr.Function must be URB_FUNCTION_SELECT_INTERFACE, and Hdr.Length must be the size of the entire URB.

ConfigurationHandle

Specifies the handle to the configuration that this interface belongs to. The host controller driver returns this handle when the client selects the configuration with an URB_FUNCTION_SELECT_CONFIGURATION request.

Interface

A variable-length USBD_INTERFACE_INFORMATION structure that specifies the interface and the new alternate setting for that interface, and if required, the new maximum packet sizes for the corresponding pipes. For more information, see Remarks.

Remarks

You can use the GET_SELECT_INTERFACE_REQUEST_SIZE macro to determine the size of the URB_FUNCTION_SELECT_INTERFACE URB, and the UsbBuildSelectInterfaceRequest routine to format the URB.

The USBD_INTERFACE_INFORMATION structure contains information about the interface and its alternate setting. The Pipes member of USBD_INTERFACE_INFORMATION points to an array of USBD_PIPE_INFORMATION structures. The array stores information about the pipes associated with the endpoints of the interface. You can override certain default settings for a pipe, such as its maximum packet size. To alter the maximum packet size, set the USBD_PF_CHANGE_MAX_PACKET flag in Pipes[i].PipeFlags, and then specify the new value in Pipes[i].MaximumPacketSize.

After the bus driver successfully completes processing the URB_FUNCTION_SELECT_INTERFACE URB, it returns an array of handles for each pipe in the Pipes[i].PipeHandle member. The client driver can store pipe handles to send I/O requests to specific pipes.

Requirements

Header

Usb.h (include Usb.h)

See also

URB
_URB_HEADER
USBD_INTERFACE_INFORMATION
Configuring USB Devices
USB Structures

 

 

Send comments about this topic to Microsoft

Build date: 12/5/2013

Show:
© 2014 Microsoft. All rights reserved.