Modifier and Type | Method and Description |
---|---|
static int |
LibUsb.eventHandlerActive(Context context)
Determine if an active thread is handling events (i.e.
|
static int |
LibUsb.eventHandlingOk(Context context)
Determine if it is still OK for this thread to be doing event handling.
|
static void |
LibUsb.exit(Context context)
Deinitialize libusb.
|
static int |
LibUsb.getContainerIdDescriptor(Context context,
BosDevCapabilityDescriptor devCapDescriptor,
ContainerIdDescriptor containerIdDescriptor)
Get a Container ID descriptor.
|
static int |
LibUsb.getDeviceList(Context context,
DeviceList list)
Returns a list of USB devices currently attached to the system.
|
static int |
LibUsb.getNextTimeout(Context context,
LongBuffer timeout)
Determine the next internal timeout that libusb needs to handle.
|
static Pollfds |
LibUsb.getPollfds(Context context)
Retrieve a list of file descriptors that should be polled by your main loop as libusb event sources.
|
static int |
LibUsb.getPortPath(Context context,
Device device,
ByteBuffer path)
Deprecated.
Please use
LibUsb.getPortNumbers(Device, ByteBuffer)
instead. |
static int |
LibUsb.getSsEndpointCompanionDescriptor(Context context,
EndpointDescriptor endpointDescriptor,
SsEndpointCompanionDescriptor companionDescriptor)
Get an endpoints superspeed endpoint companion descriptor (if any).
|
static int |
LibUsb.getSsUsbDeviceCapabilityDescriptor(Context context,
BosDevCapabilityDescriptor devCapDescriptor,
SsUsbDeviceCapabilityDescriptor ssUsbDeviceCapabilityDescriptor)
Get a SuperSpeed USB Device Capability descriptor.
|
static int |
LibUsb.getUsb20ExtensionDescriptor(Context context,
BosDevCapabilityDescriptor devCapDescriptor,
Usb20ExtensionDescriptor extensionDescriptor)
Get an USB 2.0 Extension descriptor.
|
static int |
LibUsb.handleEvents(Context context)
Handle any pending events in blocking mode.
|
static int |
LibUsb.handleEventsCompleted(Context context,
IntBuffer completed)
Handle any pending events in blocking mode.
|
static int |
LibUsb.handleEventsLocked(Context context,
long timeout)
Handle any pending events by polling file descriptors, without checking
if any other threads are already doing so.
|
static int |
LibUsb.handleEventsTimeout(Context context,
long timeout)
Handle any pending events.
|
static int |
LibUsb.handleEventsTimeoutCompleted(Context context,
long timeout,
IntBuffer completed)
Handle any pending events.
|
static void |
LibUsb.hotplugDeregisterCallback(Context context,
HotplugCallbackHandle callbackHandle)
Deregisters a hotplug callback.
|
static int |
LibUsb.hotplugRegisterCallback(Context context,
int events,
int flags,
int vendorId,
int productId,
int deviceClass,
HotplugCallback callback,
Object userData,
HotplugCallbackHandle callbackHandle)
Register a hotplug callback function.
|
static int |
LibUsb.init(Context context)
Initialize libusb.
|
static void |
LibUsb.interruptEventHandler(Context context)
Interrupt any active thread that is handling events.
|
static void |
LibUsb.lockEvents(Context context)
Acquire the event handling lock, blocking until successful acquisition if
it is contended.
|
static void |
LibUsb.lockEventWaiters(Context context)
Acquire the event waiters lock.
|
static DeviceHandle |
LibUsb.openDeviceWithVidPid(Context context,
short vendorId,
short productId)
Convenience function for finding a device with a particular
idVendor/idProduct combination.
|
static int |
LibUsb.pollfdsHandleTimeouts(Context context)
Determines whether your application must apply special timing
considerations when monitoring libusb's file descriptors.
|
int |
HotplugCallback.processEvent(Context context,
Device device,
int event,
Object userData)
Process a hotplug event.
|
static void |
LibUsb.setDebug(Context context,
int level)
Deprecated.
Use
LibUsb.setOption(Context, int, int) instead using the LibUsb.OPTION_LOG_LEVEL option. |
static int |
LibUsb.setOption(Context context,
int option)
Set an option in the library.
|
static int |
LibUsb.setOption(Context context,
int option,
int value)
Set an option in the library.
|
static void |
LibUsb.setPollfdNotifiers(Context context,
PollfdListener listener,
Object userData)
Register notification functions for file descriptor additions/removals.
|
static int |
LibUsb.tryLockEvents(Context context)
Attempt to acquire the event handling lock.
|
static void |
LibUsb.unlockEvents(Context context)
Release the lock previously acquired with
LibUsb.tryLockEvents(Context)
or LibUsb.lockEvents(Context) . |
static void |
LibUsb.unlockEventWaiters(Context context)
Release the event waiters lock.
|
static int |
LibUsb.waitForEvent(Context context,
long timeout)
Wait for another thread to signal completion of an event.
|
Copyright © 2011–2018 usb4java Team. All rights reserved.