Modifier and Type | Method and Description |
---|---|
DeviceHandle |
Transfer.devHandle()
Returns the handle of the device that this transfer will be submitted to.
|
static DeviceHandle |
LibUsb.openDeviceWithVidPid(Context context,
short vendorId,
short productId)
Convenience function for finding a device with a particular
idVendor/idProduct combination.
|
Modifier and Type | Method and Description |
---|---|
static int |
LibUsb.allocStreams(DeviceHandle handle,
int numStreams,
byte[] endpoints)
Allocate up to numStreams USB bulk streams on the specified endpoints.
|
static int |
LibUsb.attachKernelDriver(DeviceHandle handle,
int interfaceNumber)
Re-attach an interface's kernel driver, which was previously detached
using
LibUsb.detachKernelDriver(DeviceHandle, int) . |
static int |
LibUsb.bulkTransfer(DeviceHandle handle,
byte endpoint,
ByteBuffer data,
IntBuffer transferred,
long timeout)
Perform a USB bulk transfer.
|
static int |
LibUsb.claimInterface(DeviceHandle handle,
int iface)
Claim an interface on a given device handle.
|
static int |
LibUsb.clearHalt(DeviceHandle handle,
byte endpoint)
Clear the halt/stall condition for an endpoint.
|
static void |
LibUsb.close(DeviceHandle handle)
Close a device handle.
|
static int |
LibUsb.controlTransfer(DeviceHandle handle,
byte bmRequestType,
byte bRequest,
short wValue,
short wIndex,
ByteBuffer data,
long timeout)
Perform a USB control transfer.
|
static int |
LibUsb.detachKernelDriver(DeviceHandle handle,
int interfaceNumber)
Detach a kernel driver from an interface.
|
static ByteBuffer |
LibUsb.devMemAlloc(DeviceHandle handle,
int length)
Attempts to allocate a block of persistent DMA memory suitable for transfers against the given device.
|
static int |
LibUsb.devMemFree(DeviceHandle handle,
ByteBuffer buffer,
int size)
Free device memory allocated with
LibUsb.devMemAlloc(DeviceHandle, int) . |
String |
DeviceDescriptor.dump(DeviceHandle handle)
Returns a dump of this descriptor.
|
static void |
LibUsb.fillBulkStreamTransfer(Transfer transfer,
DeviceHandle handle,
byte endpoint,
int streamId,
ByteBuffer buffer,
TransferCallback callback,
Object userData,
long timeout)
Helper function to populate the required
Transfer fields
for a bulk transfer using bulk streams. |
static void |
LibUsb.fillBulkTransfer(Transfer transfer,
DeviceHandle handle,
byte endpoint,
ByteBuffer buffer,
TransferCallback callback,
Object userData,
long timeout)
Helper function to populate the required
Transfer fields for a
bulk transfer. |
static void |
LibUsb.fillControlTransfer(Transfer transfer,
DeviceHandle handle,
ByteBuffer buffer,
TransferCallback callback,
Object userData,
long timeout)
Helper function to populate the required
Transfer fields for a
control transfer. |
static void |
LibUsb.fillInterruptTransfer(Transfer transfer,
DeviceHandle handle,
byte endpoint,
ByteBuffer buffer,
TransferCallback callback,
Object userData,
long timeout)
Helper function to populate the required
Transfer fields for an
interrupt transfer. |
static void |
LibUsb.fillIsoTransfer(Transfer transfer,
DeviceHandle handle,
byte endpoint,
ByteBuffer buffer,
int numIsoPackets,
TransferCallback callback,
Object userData,
long timeout)
Helper function to populate the required
Transfer fields for an
isochronous transfer. |
static int |
LibUsb.freeStreams(DeviceHandle handle,
byte[] endpoints)
Free USB bulk streams allocated with LibUsb.allocStreams().
|
static int |
LibUsb.getBosDescriptor(DeviceHandle handle,
BosDescriptor descriptor)
Get a Binary Object Store (BOS) descriptor.
|
static int |
LibUsb.getConfiguration(DeviceHandle handle,
IntBuffer config)
Determine the bConfigurationValue of the currently active configuration.
|
static int |
LibUsb.getDescriptor(DeviceHandle handle,
byte type,
byte index,
ByteBuffer data)
Retrieve a descriptor from the default control pipe.
|
static Device |
LibUsb.getDevice(DeviceHandle handle)
Get the underlying device for a handle.
|
static String |
LibUsb.getStringDescriptor(DeviceHandle handle,
byte index)
A simple wrapper around
LibUsb.getStringDescriptorAscii(DeviceHandle, byte, StringBuffer) . |
static int |
LibUsb.getStringDescriptor(DeviceHandle handle,
byte index,
short langId,
ByteBuffer data)
Retrieve a descriptor from a device.
|
static int |
LibUsb.getStringDescriptorAscii(DeviceHandle handle,
byte index,
StringBuffer string)
Retrieve a string descriptor in C style ASCII.
|
static int |
LibUsb.interruptTransfer(DeviceHandle handle,
byte endpoint,
ByteBuffer data,
IntBuffer transferred,
long timeout)
Perform a USB interrupt transfer.
|
static int |
LibUsb.kernelDriverActive(DeviceHandle handle,
int interfaceNumber)
Determine if a kernel driver is active on an interface.
|
static int |
LibUsb.open(Device device,
DeviceHandle handle)
Open a device and obtain a device handle.
|
static int |
LibUsb.releaseInterface(DeviceHandle handle,
int iface)
Release an interface previously claimed with
LibUsb.claimInterface(DeviceHandle, int) . |
static int |
LibUsb.resetDevice(DeviceHandle handle)
Perform a USB port reset to reinitialize a device.
|
static int |
LibUsb.setAutoDetachKernelDriver(DeviceHandle handle,
boolean enable)
Enable/disable libusb's automatic kernel driver detachment.
|
static int |
LibUsb.setConfiguration(DeviceHandle handle,
int config)
Set the active configuration for a device.
|
void |
Transfer.setDevHandle(DeviceHandle handle)
Sets the handle of the device that this transfer will be submitted to.
|
static int |
LibUsb.setInterfaceAltSetting(DeviceHandle handle,
int interfaceNumber,
int alternateSetting)
Activate an alternate setting for an interface.
|
Copyright © 2011–2018 usb4java Team. All rights reserved.