UsbSetupPacket UsbSetupPacket UsbSetupPacket Class

Definition

Describes the setup packet for a USB control transfer. For an explanation of the setup packet, see Table 9.2 in the Universal Serial Bus (USB) specification.

public sealed class UsbSetupPacket : IUsbSetupPacketpublic sealed class UsbSetupPacket : IUsbSetupPacketPublic NotInheritable Class UsbSetupPacket Implements IUsbSetupPacket
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Constructors

UsbSetupPacket() UsbSetupPacket() UsbSetupPacket()

Creates a UsbSetupPacket object.

public UsbSetupPacket()public UsbSetupPacket()Public Sub New()
Attributes

UsbSetupPacket(IBuffer) UsbSetupPacket(IBuffer) UsbSetupPacket(IBuffer)

Creates a UsbSetupPacket object from a formatted buffer (eight bytes) that contains the setup packet.

public UsbSetupPacket(IBuffer eightByteBuffer)public UsbSetupPacket(IBuffer eightByteBuffer)Public Sub New(eightByteBuffer As IBuffer)
Parameters
eightByteBuffer
IBuffer IBuffer IBuffer

A caller-supplied buffer that contains the setup packet formatted as per the standard USB specification. The length of the buffer must be eight bytes because that is the size of a setup packet on the bus.

Attributes

Properties

Index Index Index

Gets or sets the wIndex field in the setup packet of the USB control transfer.

public uint Index { get; set; }public uint Index { get; set; }Public ReadWrite Property Index As uint
Value
uint uint uint

The wIndex field in the setup packet. For an explanation of this field, see section 9.3.4 of the Universal Serial Bus (USB) specification.

Attributes

Length Length Length

Gets the length, in bytes, of the setup packet.

public uint Length { get; set; }public uint Length { get; set; }Public ReadWrite Property Length As uint
Value
uint uint uint

The length, in bytes, of the setup packet.

Attributes

Request Request Request

Gets or sets the bRequest field in the setup packet of the USB control transfer.

public byte Request { get; set; }public byte Request { get; set; }Public ReadWrite Property Request As byte
Value
byte byte byte

The bRequest field in the setup packet. For an explanation of this field, see section 9.3.2 of the Universal Serial Bus (USB) specification.

Attributes

RequestType RequestType RequestType

Gets or sets the bmRequestType field in the setup packet of the USB control transfer. That field is represented by a UsbControlRequestType object.

public UsbControlRequestType RequestType { get; set; }public UsbControlRequestType RequestType { get; set; }Public ReadWrite Property RequestType As UsbControlRequestType
Value
UsbControlRequestType UsbControlRequestType UsbControlRequestType

The bmRequestType field in the setup packet. The values that are assigned to this field are described in Table 9.2 and section 9.3.1 of the Universal Serial Bus (USB) specification.

Attributes

Value Value Value

Gets or sets the wValue field in the setup packet of the USB control transfer.

public uint Value { get; set; }public uint Value { get; set; }Public ReadWrite Property Value As uint
Value
uint uint uint

The wValue field in the setup packet and the value varies according to the request. For an explanation of this field, see section 9.3.3 of the Universal Serial Bus (USB) specification.

Attributes