Expand Minimize

UsbBuildFeatureRequest macro

The UsbBuildFeatureRequest macro formats an URB with the parameters necessary to request that a feature be turned on or off on a USB device.

Syntax


void UsbBuildFeatureRequest(
  [in, out]  PURB Urb,
  [in]       USHORT Op,
  [in]       USHORT FeatureSelector,
  [in]       USHORT Index,
  [in]       PURB Link
);

Parameters

Urb [in, out]

Pointer to an URB to be formatted as a feature request to a device.

Op [in]

Specifies one of the following operation codes:

URB_FUNCTION_SET_FEATURE_TO_DEVICE

Sets a USB-defined feature, specified by FeatureSelector, on a device.

URB_FUNCTION_SET_FEATURE_TO_INTERFACE

Sets a USB-defined feature, specified by FeatureSelector, on an interface for a device.

URB_FUNCTION_SET_FEATURE_TO_ENDPOINT

Sets a USB-defined feature, specified by FeatureSelector, on an endpoint for an interface on a USB device.

URB_FUNCTION_SET_FEATURE_TO_OTHER

Sets a USB-defined feature, specified by FeatureSelector, on a device-defined target on a USB device.

URB_FUNCTION_CLEAR_FEATURE_TO_DEVICE

Clears a USB-defined feature, specified by FeatureSelector, on a device.

URB_FUNCTION_CLEAR_FEATURE_TO_INTERFACE

Clears a USB-defined feature, specified by FeatureSelector, on an interface for a device.

URB_FUNCTION_CLEAR_FEATURE_TO_ENDPOINT

Clears a USB-defined feature, specified by FeatureSelector, on an endpoint, for an interface, on a USB device.

URB_FUNCTION_CLEAR_FEATURE_TO_OTHER

Clears a USB-defined feature, specified by FeatureSelector, on a device-defined target on a USB device.

FeatureSelector [in]

Specifies the USB-defined feature code that should be set or cleared on the target as specified by Op.

Index [in]

For a feature request for an endpoint or interface, specifies the index of the endpoint or interface within the configuration descriptor. For the device, this must be zero.

Link [in]

Reserved. Must be set to NULL.

Return value

This macro does not return a value.

Requirements

Header

Usbdlib.h (include Usbdlib.h)

See also

URB
_URB_CONTROL_FEATURE_REQUEST
Routines for USB Client Drivers

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft. All rights reserved.