Click or drag to resize

USBDeviceControlIn Method (Byte, Byte, Int32, Int32, Byte)

Initiates a control transfer over the default control endpoint. The request should have an IN direction (specified by the highest bit of the requestType parameter). The length of buffer given by the buffer parameter will dictate the number of bytes that are transfered and the value of the setup packet's length member.

Namespace:  MadWizard.WinUSBNet
Assembly:  WinUSBNet (in WinUSBNet.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax
public int ControlIn(
	byte requestType,
	byte request,
	int value,
	int index,
	byte[] buffer
)

Parameters

requestType
Type: SystemByte
The setup packet request type. The request type must specify the IN direction (highest bit set).
request
Type: SystemByte
The setup packet device request.
value
Type: SystemInt32
The value member in the setup packet. Its meaning depends on the request. Value should be between zero and 65535 (0xFFFF).
index
Type: SystemInt32
The index member in the setup packet. Its meaning depends on the request. Index should be between zero and 65535 (0xFFFF).
buffer
Type: SystemByte
The buffer that will receive the data transfered. The length of this buffer will be the number of bytes transfered.

Return Value

Type: Int32
The number of bytes received from the device.
See Also