Method
GUsbDevicecontrol_transfer
since: 0.1.0
Declaration
gboolean
g_usb_device_control_transfer (
GUsbDevice* self,
GUsbDeviceDirection direction,
GUsbDeviceRequestType request_type,
GUsbDeviceRecipient recipient,
guint8 request,
guint16 value,
guint16 idx,
guint8* data,
gsize length,
gsize* actual_length,
guint timeout,
GCancellable* cancellable,
GError** error
)
Description
Perform a USB control transfer.
Warning: this function is synchronous, and cannot be cancelled.
Available since: 0.1.0
Parameters
direction-
Type:
GUsbDeviceDirectionNo description available.
request_type-
Type:
GUsbDeviceRequestTypeThe request type field for the setup packet.
recipient-
Type:
GUsbDeviceRecipientNo description available.
request-
Type:
guint8The request field for the setup packet.
value-
Type:
guint16The value field for the setup packet.
idx-
Type:
guint16The index field for the setup packet.
data-
Type: An array of
guint8A suitably-sized data buffer for either input or output.
The length of the array is specified in the lengthargument.The data is owned by the caller of the function. length-
Type:
gsizeThe length field for the setup packet.
actual_length-
Type:
gsize*The actual number of bytes sent, or
NULL.The argument will be set by the function. The argument can be NULL. timeout-
Type:
guintTimeout timeout (in milliseconds) that this function should wait before giving up due to no response being received. For an unlimited timeout, use 0.
cancellable-
Type:
GCancellableA
GCancellable, orNULL.The argument can be NULL.The data is owned by the caller of the function. error-
Type:
GError **The return location for a recoverable error.
The argument can be NULL.If the return location is not NULL, then you must initialize it to aNULLGError*.The argument will left initialized to NULLby the method if there are no errors.In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.