public void ControlTransfer(byte requestType, byte request, ushort val, ushort index, byte[] data, uint timeout) { ushort len = 0; if (data != null) { len = (ushort)data.Length; } Internal.Constants.LibUSBError retval = Internal.Methods.libusb_control_transfer(mvarHandle, requestType, request, val, index, data, len, timeout); Internal.Methods.libusb_error_to_exception(retval); }
public UsbContext() { Internal.Constants.LibUSBError retval = Internal.Methods.libusb_init(ref mvarHandle); }
public void AttachKernelDriver(int interfaceNumber) { Internal.Constants.LibUSBError retval = Internal.Methods.libusb_attach_kernel_driver(mvarHandle, interfaceNumber); Internal.Methods.libusb_error_to_exception(retval); }
public void ReleaseInterface(int intf) { Internal.Constants.LibUSBError v = Internal.Methods.libusb_release_interface(mvarHandle, intf); Internal.Methods.libusb_error_to_exception(v); }
public void SetConfiguration(int configuration) { Internal.Constants.LibUSBError v = Internal.Methods.libusb_set_configuration(mvarHandle, configuration); Internal.Methods.libusb_error_to_exception(v); }
public void BulkTransfer(byte endpoint, byte[] data, out int actualLength, uint timeout) { actualLength = 0; Internal.Constants.LibUSBError retval = Internal.Methods.libusb_bulk_transfer(mvarHandle, endpoint, data, data.Length, ref actualLength, timeout); Internal.Methods.libusb_error_to_exception(retval); }