WDF_USB_CONTROL_SETUP_PACKET_INIT_GET_STATUS function (wdfusb.h)
[Applies to KMDF and UMDF]
The WDF_USB_CONTROL_SETUP_PACKET_INIT_GET_STATUS function initializes a WDF_USB_CONTROL_SETUP_PACKET structure for a USB control transfer that obtains device status.
Syntax
void WDF_USB_CONTROL_SETUP_PACKET_INIT_GET_STATUS(
[out] PWDF_USB_CONTROL_SETUP_PACKET Packet,
[in] WDF_USB_BMREQUEST_RECIPIENT BmRequestRecipient,
[in] USHORT Index
);
Parameters
[out] Packet
A pointer to a WDF_USB_CONTROL_SETUP_PACKET structure.
[in] BmRequestRecipient
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.
[in] Index
A status index value that is stored in the Packet.wIndex.Value member of the WDF_USB_CONTROL_SETUP_PACKET structure.
Return value
None
Remarks
The WDF_USB_CONTROL_SETUP_PACKET_INIT_GET_STATUS function does the following:
- Zeros the WDF_USB_CONTROL_SETUP_PACKET structure.
- Sets the Packet.bm.Request.Type member to BmRequestStandard.
- Sets the Packet.bm.Request.Dir member to BmRequestDeviceToHost.
- Sets the Packet.bRequest member to a "get status" request value.
- Sets the Packet.wValue.Value member to zero.
- Sets the Packet->Packet.wIndex.Value member to the Index argument.
- WDF_USB_CONTROL_SETUP_PACKET_INIT_GET_STATUS
Examples
The following code example initializes a WDF_USB_CONTROL_SETUP_PACKET structure.
WDF_USB_CONTROL_SETUP_PACKET packet;
WDF_USB_CONTROL_SETUP_PACKET_INIT_GET_STATUS(
&packet,
BmRequestToDevice,
0
);
Requirements
Requirement | Value |
---|---|
Target Platform | Universal |
Minimum KMDF version | 1.0 |
Minimum UMDF version | 2.0 |
Header | wdfusb.h (include Wdfusb.h) |
See also
WDF_USB_CONTROL_SETUP_PACKET_INIT
WDF_USB_CONTROL_SETUP_PACKET_INIT_CLASS