// wdfusb.h
VOID WDF_USB_CONTROL_SETUP_PACKET_INIT_FEATURE(
[out] PWDF_USB_CONTROL_SETUP_PACKET Packet,
[in] WDF_USB_BMREQUEST_RECIPIENT BmRequestRecipient,
[in] USHORT FeatureSelector,
[in] USHORT Index,
[in] BOOLEAN SetFeature
);
View the official Windows Driver Kit DDI reference
No description available.
[Applies to KMDF and UMDF]
The WDF_USB_CONTROL_SETUP_PACKET_INIT_FEATURE function initializes a WDF_USB_CONTROL_SETUP_PACKET structure for a USB control transfer that sets or clears a device feature.
Packet
[out]A pointer to a WDF_USB_CONTROL_SETUP_PACKET structure.
BmRequestRecipient
[in]A WDF_USB_BMREQUEST_RECIPIENT-typed value that is stored in the Packet.bm.Request.Recipient member of the WDF_USB_CONTROL_SETUP_PACKET structure.
FeatureSelector
[in]A feature-specific value that is stored in the Packet.wValue.Value member of the WDF_USB_CONTROL_SETUP_PACKET structure.
Index
[in]A feature-specific index value that is stored in the Packet.wIndex.Value member of the WDF_USB_CONTROL_SETUP_PACKET structure.
SetFeature
[in]A Boolean value that, if TRUE, indicates that the specified feature will be set. If FALSE, the specified feature will be cleared.
The WDF_USB_CONTROL_SETUP_PACKET_INIT_FEATURE function does the following:
To initialize a WDF_USB_CONTROL_SETUP_PACKET structure, the driver should call one of the following functions:
The following code example initializes a WDF_USB_CONTROL_SETUP_PACKET structure.
WDF_USB_CONTROL_SETUP_PACKET packet;
WDF_USB_CONTROL_SETUP_PACKET_INIT_FEATURE(
&packet,
BMREQUEST_TO_DEVICE,
USB_DEVICE_DESCRIPTOR_TYPE,
0,
FALSE
);
WDF_USB_CONTROL_SETUP_PACKET_INIT
WDF_USB_CONTROL_SETUP_PACKET_INIT_CLASS
WDF_USB_CONTROL_SETUP_PACKET_INIT_GET_STATUS
WDF_USB_CONTROL_SETUP_PACKET_INIT_VENDOR