Android.Hardware.Usb.UsbDeviceConnection.ControlTransfer Method
Performs a control transaction on endpoint zero for this device.

Syntax

[Android.Runtime.Register("controlTransfer", "(IIII[BII)I", "GetControlTransfer_IIIIarrayBIIHandler")]
public virtual int ControlTransfer ([Android.Runtime.GeneratedEnum] UsbAddressing requestType, int request, int value, int index, byte[] buffer, int length, int timeout)

Parameters

requestType
request type for this transaction
request
request ID for this transaction
value
value field for this transaction
index
index field for this transaction
buffer
buffer for data portion of transaction, or null if no data needs to be sent or received
length
the length of the data to send or receive
timeout
in milliseconds

Returns

Documentation for this section has not yet been entered.

Remarks

Performs a control transaction on endpoint zero for this device. The direction of the transfer is determined by the request type. If requestType & UsbConstants.USB_ENDPOINT_DIR_MASK is UsbConstants.USB_DIR_OUT, then the transfer is a write, and if it is UsbConstants.USB_DIR_IN, then the transfer is a read.

This method transfers data starting from index 0 in the buffer. To specify a different offset, use UsbDeviceConnection.ControlTransfer(UsbAddressing, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32).

[Android Documentation]

Requirements

Namespace: Android.Hardware.Usb
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 12