LMS 2012
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
libusb.h File Reference
#include <stdint.h>
#include <sys/time.h>
#include <sys/types.h>
#include <time.h>
#include <limits.h>

Go to the source code of this file.

Data Structures

struct  libusb_device_descriptor
 
struct  libusb_endpoint_descriptor
 
struct  libusb_interface_descriptor
 
struct  libusb_interface
 
struct  libusb_config_descriptor
 
struct  libusb_control_setup
 
struct  libusb_iso_packet_descriptor
 
struct  libusb_transfer
 
struct  libusb_pollfd
 

Macros

#define libusb_cpu_to_le16(x)
 
#define libusb_le16_to_cpu   libusb_cpu_to_le16
 
#define LIBUSB_DT_DEVICE_SIZE   18
 
#define LIBUSB_DT_CONFIG_SIZE   9
 
#define LIBUSB_DT_INTERFACE_SIZE   9
 
#define LIBUSB_DT_ENDPOINT_SIZE   7
 
#define LIBUSB_DT_ENDPOINT_AUDIO_SIZE   9 /* Audio extension */
 
#define LIBUSB_DT_HUB_NONVAR_SIZE   7
 
#define LIBUSB_ENDPOINT_ADDRESS_MASK   0x0f /* in bEndpointAddress */
 
#define LIBUSB_ENDPOINT_DIR_MASK   0x80
 
#define LIBUSB_TRANSFER_TYPE_MASK   0x03 /* in bmAttributes */
 
#define LIBUSB_ISO_SYNC_TYPE_MASK   0x0C
 
#define LIBUSB_ISO_USAGE_TYPE_MASK   0x30
 
#define LIBUSB_CONTROL_SETUP_SIZE   (sizeof(struct libusb_control_setup))
 

Typedefs

typedef struct libusb_context libusb_context
 
typedef struct libusb_device libusb_device
 
typedef struct libusb_device_handle libusb_device_handle
 
typedef void(* libusb_transfer_cb_fn )(struct libusb_transfer *transfer)
 
typedef void(* libusb_pollfd_added_cb )(int fd, short events, void *user_data)
 
typedef void(* libusb_pollfd_removed_cb )(int fd, void *user_data)
 

Enumerations

enum  libusb_class_code {
  LIBUSB_CLASS_PER_INTERFACE = 0, LIBUSB_CLASS_AUDIO = 1, LIBUSB_CLASS_COMM = 2, LIBUSB_CLASS_HID = 3,
  LIBUSB_CLASS_PRINTER = 7, LIBUSB_CLASS_PTP = 6, LIBUSB_CLASS_MASS_STORAGE = 8, LIBUSB_CLASS_HUB = 9,
  LIBUSB_CLASS_DATA = 10, LIBUSB_CLASS_WIRELESS = 0xe0, LIBUSB_CLASS_APPLICATION = 0xfe, LIBUSB_CLASS_VENDOR_SPEC = 0xff
}
 
enum  libusb_descriptor_type {
  LIBUSB_DT_DEVICE = 0x01, LIBUSB_DT_CONFIG = 0x02, LIBUSB_DT_STRING = 0x03, LIBUSB_DT_INTERFACE = 0x04,
  LIBUSB_DT_ENDPOINT = 0x05, LIBUSB_DT_HID = 0x21, LIBUSB_DT_REPORT = 0x22, LIBUSB_DT_PHYSICAL = 0x23,
  LIBUSB_DT_HUB = 0x29
}
 
enum  libusb_endpoint_direction { LIBUSB_ENDPOINT_IN = 0x80, LIBUSB_ENDPOINT_OUT = 0x00 }
 
enum  libusb_transfer_type { LIBUSB_TRANSFER_TYPE_CONTROL = 0, LIBUSB_TRANSFER_TYPE_ISOCHRONOUS = 1, LIBUSB_TRANSFER_TYPE_BULK = 2, LIBUSB_TRANSFER_TYPE_INTERRUPT = 3 }
 
enum  libusb_standard_request {
  LIBUSB_REQUEST_GET_STATUS = 0x00, LIBUSB_REQUEST_CLEAR_FEATURE = 0x01, LIBUSB_REQUEST_SET_FEATURE = 0x03, LIBUSB_REQUEST_SET_ADDRESS = 0x05,
  LIBUSB_REQUEST_GET_DESCRIPTOR = 0x06, LIBUSB_REQUEST_SET_DESCRIPTOR = 0x07, LIBUSB_REQUEST_GET_CONFIGURATION = 0x08, LIBUSB_REQUEST_SET_CONFIGURATION = 0x09,
  LIBUSB_REQUEST_GET_INTERFACE = 0x0A, LIBUSB_REQUEST_SET_INTERFACE = 0x0B, LIBUSB_REQUEST_SYNCH_FRAME = 0x0C
}
 
enum  libusb_request_type { LIBUSB_REQUEST_TYPE_STANDARD = (0x00 << 5), LIBUSB_REQUEST_TYPE_CLASS = (0x01 << 5), LIBUSB_REQUEST_TYPE_VENDOR = (0x02 << 5), LIBUSB_REQUEST_TYPE_RESERVED = (0x03 << 5) }
 
enum  libusb_request_recipient { LIBUSB_RECIPIENT_DEVICE = 0x00, LIBUSB_RECIPIENT_INTERFACE = 0x01, LIBUSB_RECIPIENT_ENDPOINT = 0x02, LIBUSB_RECIPIENT_OTHER = 0x03 }
 
enum  libusb_iso_sync_type { LIBUSB_ISO_SYNC_TYPE_NONE = 0, LIBUSB_ISO_SYNC_TYPE_ASYNC = 1, LIBUSB_ISO_SYNC_TYPE_ADAPTIVE = 2, LIBUSB_ISO_SYNC_TYPE_SYNC = 3 }
 
enum  libusb_iso_usage_type { LIBUSB_ISO_USAGE_TYPE_DATA = 0, LIBUSB_ISO_USAGE_TYPE_FEEDBACK = 1, LIBUSB_ISO_USAGE_TYPE_IMPLICIT = 2 }
 
enum  libusb_error {
  LIBUSB_SUCCESS = 0, LIBUSB_ERROR_IO = -1, LIBUSB_ERROR_INVALID_PARAM = -2, LIBUSB_ERROR_ACCESS = -3,
  LIBUSB_ERROR_NO_DEVICE = -4, LIBUSB_ERROR_NOT_FOUND = -5, LIBUSB_ERROR_BUSY = -6, LIBUSB_ERROR_TIMEOUT = -7,
  LIBUSB_ERROR_OVERFLOW = -8, LIBUSB_ERROR_PIPE = -9, LIBUSB_ERROR_INTERRUPTED = -10, LIBUSB_ERROR_NO_MEM = -11,
  LIBUSB_ERROR_NOT_SUPPORTED = -12, LIBUSB_ERROR_OTHER = -99
}
 
enum  libusb_transfer_status {
  LIBUSB_TRANSFER_COMPLETED, LIBUSB_TRANSFER_ERROR, LIBUSB_TRANSFER_TIMED_OUT, LIBUSB_TRANSFER_CANCELLED,
  LIBUSB_TRANSFER_STALL, LIBUSB_TRANSFER_NO_DEVICE, LIBUSB_TRANSFER_OVERFLOW
}
 
enum  libusb_transfer_flags { LIBUSB_TRANSFER_SHORT_NOT_OK = 1<<0, LIBUSB_TRANSFER_FREE_BUFFER = 1<<1, LIBUSB_TRANSFER_FREE_TRANSFER = 1<<2 }
 

Functions

int libusb_init (libusb_context **ctx)
 
void libusb_exit (libusb_context *ctx)
 
void libusb_set_debug (libusb_context *ctx, int level)
 
ssize_t libusb_get_device_list (libusb_context *ctx, libusb_device ***list)
 
void libusb_free_device_list (libusb_device **list, int unref_devices)
 
libusb_devicelibusb_ref_device (libusb_device *dev)
 
void libusb_unref_device (libusb_device *dev)
 
int libusb_get_configuration (libusb_device_handle *dev, int *config)
 
int libusb_get_device_descriptor (libusb_device *dev, struct libusb_device_descriptor *desc)
 
int libusb_get_active_config_descriptor (libusb_device *dev, struct libusb_config_descriptor **config)
 
int libusb_get_config_descriptor (libusb_device *dev, uint8_t config_index, struct libusb_config_descriptor **config)
 
int libusb_get_config_descriptor_by_value (libusb_device *dev, uint8_t bConfigurationValue, struct libusb_config_descriptor **config)
 
void libusb_free_config_descriptor (struct libusb_config_descriptor *config)
 
uint8_t libusb_get_bus_number (libusb_device *dev)
 
uint8_t libusb_get_device_address (libusb_device *dev)
 
int libusb_get_max_packet_size (libusb_device *dev, unsigned char endpoint)
 
int libusb_get_max_iso_packet_size (libusb_device *dev, unsigned char endpoint)
 
int libusb_open (libusb_device *dev, libusb_device_handle **handle)
 
void libusb_close (libusb_device_handle *dev_handle)
 
libusb_devicelibusb_get_device (libusb_device_handle *dev_handle)
 
int libusb_set_configuration (libusb_device_handle *dev, int configuration)
 
int libusb_claim_interface (libusb_device_handle *dev, int iface)
 
int libusb_release_interface (libusb_device_handle *dev, int iface)
 
libusb_device_handlelibusb_open_device_with_vid_pid (libusb_context *ctx, uint16_t vendor_id, uint16_t product_id)
 
int libusb_set_interface_alt_setting (libusb_device_handle *dev, int interface_number, int alternate_setting)
 
int libusb_clear_halt (libusb_device_handle *dev, unsigned char endpoint)
 
int libusb_reset_device (libusb_device_handle *dev)
 
int libusb_kernel_driver_active (libusb_device_handle *dev, int interface)
 
int libusb_detach_kernel_driver (libusb_device_handle *dev, int interface)
 
int libusb_attach_kernel_driver (libusb_device_handle *dev, int interface)
 
struct libusb_transferlibusb_alloc_transfer (int iso_packets)
 
int libusb_submit_transfer (struct libusb_transfer *transfer)
 
int libusb_cancel_transfer (struct libusb_transfer *transfer)
 
void libusb_free_transfer (struct libusb_transfer *transfer)
 
int libusb_control_transfer (libusb_device_handle *dev_handle, uint8_t request_type, uint8_t request, uint16_t value, uint16_t index, unsigned char *data, uint16_t length, unsigned int timeout)
 
int libusb_bulk_transfer (libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *data, int length, int *actual_length, unsigned int timeout)
 
int libusb_interrupt_transfer (libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *data, int length, int *actual_length, unsigned int timeout)
 
int libusb_get_string_descriptor_ascii (libusb_device_handle *dev, uint8_t index, unsigned char *data, int length)
 
int libusb_try_lock_events (libusb_context *ctx)
 
void libusb_lock_events (libusb_context *ctx)
 
void libusb_unlock_events (libusb_context *ctx)
 
int libusb_event_handling_ok (libusb_context *ctx)
 
int libusb_event_handler_active (libusb_context *ctx)
 
void libusb_lock_event_waiters (libusb_context *ctx)
 
void libusb_unlock_event_waiters (libusb_context *ctx)
 
int libusb_wait_for_event (libusb_context *ctx, struct timeval *tv)
 
int libusb_handle_events_timeout (libusb_context *ctx, struct timeval *tv)
 
int libusb_handle_events (libusb_context *ctx)
 
int libusb_handle_events_locked (libusb_context *ctx, struct timeval *tv)
 
int libusb_pollfds_handle_timeouts (libusb_context *ctx)
 
int libusb_get_next_timeout (libusb_context *ctx, struct timeval *tv)
 
const struct libusb_pollfd ** libusb_get_pollfds (libusb_context *ctx)
 
void libusb_set_pollfd_notifiers (libusb_context *ctx, libusb_pollfd_added_cb added_cb, libusb_pollfd_removed_cb removed_cb, void *user_data)
 

Macro Definition Documentation

#define LIBUSB_CONTROL_SETUP_SIZE   (sizeof(struct libusb_control_setup))

Definition at line 538 of file libusb.h.

#define libusb_cpu_to_le16 (   x)
Value:
({ \
union { \
uint8_t b8[2]; \
uint16_t b16; \
} _tmp; \
uint16_t _tmp2 = (uint16_t)(x); \
_tmp.b8[1] = _tmp2 >> 8; \
_tmp.b8[0] = _tmp2 & 0xff; \
_tmp.b16; \
})

Convert a 16-bit value from host-endian to little-endian format. On little endian systems, this function does nothing. On big endian systems, the bytes are swapped.

Parameters
xthe host-endian value to convert
Returns
the value in little-endian byte order

Definition at line 42 of file libusb.h.

#define LIBUSB_DT_CONFIG_SIZE   9

Definition at line 141 of file libusb.h.

#define LIBUSB_DT_DEVICE_SIZE   18

Definition at line 140 of file libusb.h.

#define LIBUSB_DT_ENDPOINT_AUDIO_SIZE   9 /* Audio extension */

Definition at line 144 of file libusb.h.

#define LIBUSB_DT_ENDPOINT_SIZE   7

Definition at line 143 of file libusb.h.

#define LIBUSB_DT_HUB_NONVAR_SIZE   7

Definition at line 145 of file libusb.h.

#define LIBUSB_DT_INTERFACE_SIZE   9

Definition at line 142 of file libusb.h.

#define LIBUSB_ENDPOINT_ADDRESS_MASK   0x0f /* in bEndpointAddress */

Definition at line 147 of file libusb.h.

#define LIBUSB_ENDPOINT_DIR_MASK   0x80

Definition at line 148 of file libusb.h.

#define LIBUSB_ISO_SYNC_TYPE_MASK   0x0C

Definition at line 259 of file libusb.h.

#define LIBUSB_ISO_USAGE_TYPE_MASK   0x30

Definition at line 280 of file libusb.h.

#define libusb_le16_to_cpu   libusb_cpu_to_le16

Convert a 16-bit value from little-endian to host-endian format. On little endian systems, this function does nothing. On big endian systems, the bytes are swapped.

Parameters
xthe little-endian value to convert
Returns
the value in host-endian byte order

Definition at line 61 of file libusb.h.

#define LIBUSB_TRANSFER_TYPE_MASK   0x03 /* in bmAttributes */

Definition at line 162 of file libusb.h.

Typedef Documentation

Structure representing a libusb session. The concept of individual libusb sessions allows for your program to use two libraries (or dynamically load two modules) which both independently use libusb. This will prevent interference between the individual libusb users - for example libusb_set_debug() will not affect the other user of the library, and libusb_exit() will not destroy resources that the other user is still using.

Sessions are created by libusb_init() and destroyed through libusb_exit(). If your application is guaranteed to only ever include a single libusb user (i.e. you), you do not have to worry about contexts: pass NULL in every function call where a context is required. The default context will be used.

For more information, see contexts.

Definition at line 563 of file libusb.h.

typedef struct libusb_device libusb_device

Structure representing a USB device detected on the system. This is an opaque type for which you are only ever provided with a pointer, usually originating from libusb_get_device_list().

Certain operations can be performed on a device, but in order to do any I/O you will have to first obtain a device handle using libusb_open().

Devices are reference counted with libusb_device_ref() and libusb_device_unref(), and are freed when the reference count reaches 0. New devices presented by libusb_get_device_list() have a reference count of 1, and libusb_free_device_list() can optionally decrease the reference count on all devices in the list. libusb_open() adds another reference which is later destroyed by libusb_close().

Definition at line 580 of file libusb.h.

Structure representing a handle on a USB device. This is an opaque type for which you are only ever provided with a pointer, usually originating from libusb_open().

A device handle is used to perform I/O and other operations. When finished with a device handle, you should call libusb_close().

Definition at line 591 of file libusb.h.

typedef void(* libusb_pollfd_added_cb)(int fd, short events, void *user_data)

Callback function, invoked when a new file descriptor should be added to the set of file descriptors monitored for events.

Parameters
fdthe new file descriptor
eventsevents to monitor for, see libusb_pollfd for a description
user_dataUser data pointer specified in libusb_set_pollfd_notifiers() call
See also
libusb_set_pollfd_notifiers()

Definition at line 1219 of file libusb.h.

typedef void(* libusb_pollfd_removed_cb)(int fd, void *user_data)

Callback function, invoked when a file descriptor should be removed from the set of file descriptors being monitored for events. After returning from this callback, do not use that file descriptor again.

Parameters
fdthe file descriptor to stop monitoring
user_dataUser data pointer specified in libusb_set_pollfd_notifiers() call
See also
libusb_set_pollfd_notifiers()

Definition at line 1230 of file libusb.h.

typedef void(* libusb_transfer_cb_fn)(struct libusb_transfer *transfer)

Asynchronous transfer callback function type. When submitting asynchronous transfers, you pass a pointer to a callback function of this type via the callback member of the libusb_transfer structure. libusb will call this function later, when the transfer has completed or failed. See asyncio for more information.

Parameters
transferThe libusb_transfer struct the callback function is being notified about.

Definition at line 708 of file libusb.h.

Enumeration Type Documentation

Device and/or Interface Class codes

Enumerator
LIBUSB_CLASS_PER_INTERFACE 

In the context of a device descriptor, this bDeviceClass value indicates that each interface specifies its own class information and all interfaces operate independently.

LIBUSB_CLASS_AUDIO 

Audio class

LIBUSB_CLASS_COMM 

Communications class

LIBUSB_CLASS_HID 

Human Interface Device class

LIBUSB_CLASS_PRINTER 

Printer dclass

LIBUSB_CLASS_PTP 

Picture transfer protocol class

LIBUSB_CLASS_MASS_STORAGE 

Mass storage class

LIBUSB_CLASS_HUB 

Hub class

LIBUSB_CLASS_DATA 

Data class

LIBUSB_CLASS_WIRELESS 

Wireless class

LIBUSB_CLASS_APPLICATION 

Application class

LIBUSB_CLASS_VENDOR_SPEC 

Class is vendor-specific

Definition at line 67 of file libusb.h.

Descriptor types as defined by the USB specification.

Enumerator
LIBUSB_DT_DEVICE 

Device descriptor. See libusb_device_descriptor.

LIBUSB_DT_CONFIG 

Configuration descriptor. See libusb_config_descriptor.

LIBUSB_DT_STRING 

String descriptor

LIBUSB_DT_INTERFACE 

Interface descriptor. See libusb_interface_descriptor.

LIBUSB_DT_ENDPOINT 

Endpoint descriptor. See libusb_endpoint_descriptor.

LIBUSB_DT_HID 

HID descriptor

LIBUSB_DT_REPORT 

HID report descriptor

LIBUSB_DT_PHYSICAL 

Physical descriptor

LIBUSB_DT_HUB 

Hub descriptor

Definition at line 110 of file libusb.h.

Endpoint direction. Values for bit 7 of the endpoint address scheme.

Enumerator
LIBUSB_ENDPOINT_IN 

In: device-to-host

LIBUSB_ENDPOINT_OUT 

Out: host-to-device

Definition at line 154 of file libusb.h.

Error codes. Most libusb functions return 0 on success or one of these codes on failure.

Enumerator
LIBUSB_SUCCESS 

Success (no error)

LIBUSB_ERROR_IO 

Input/output error

LIBUSB_ERROR_INVALID_PARAM 

Invalid parameter

LIBUSB_ERROR_ACCESS 

Access denied (insufficient permissions)

LIBUSB_ERROR_NO_DEVICE 

No such device (it may have been disconnected)

LIBUSB_ERROR_NOT_FOUND 

Entity not found

LIBUSB_ERROR_BUSY 

Resource busy

LIBUSB_ERROR_TIMEOUT 

Operation timed out

LIBUSB_ERROR_OVERFLOW 

Overflow

LIBUSB_ERROR_PIPE 

Pipe error

LIBUSB_ERROR_INTERRUPTED 

System call interrupted (perhaps due to signal)

LIBUSB_ERROR_NO_MEM 

Insufficient memory

LIBUSB_ERROR_NOT_SUPPORTED 

Operation not supported or unimplemented on this platform

LIBUSB_ERROR_OTHER 

Other error

Definition at line 597 of file libusb.h.

Synchronization type for isochronous endpoints. Values for bits 2:3 of the bmAttributes field in libusb_endpoint_descriptor.

Enumerator
LIBUSB_ISO_SYNC_TYPE_NONE 

No synchronization

LIBUSB_ISO_SYNC_TYPE_ASYNC 

Asynchronous

LIBUSB_ISO_SYNC_TYPE_ADAPTIVE 

Adaptive

LIBUSB_ISO_SYNC_TYPE_SYNC 

Synchronous

Definition at line 266 of file libusb.h.

Usage type for isochronous endpoints. Values for bits 4:5 of the bmAttributes field in libusb_endpoint_descriptor.

Enumerator
LIBUSB_ISO_USAGE_TYPE_DATA 

Data endpoint

LIBUSB_ISO_USAGE_TYPE_FEEDBACK 

Feedback endpoint

LIBUSB_ISO_USAGE_TYPE_IMPLICIT 

Implicit feedback Data endpoint

Definition at line 287 of file libusb.h.

Recipient bits of the bmRequestType field in control transfers. Values 4 through 31 are reserved.

Enumerator
LIBUSB_RECIPIENT_DEVICE 

Device

LIBUSB_RECIPIENT_INTERFACE 

Interface

LIBUSB_RECIPIENT_ENDPOINT 

Endpoint

LIBUSB_RECIPIENT_OTHER 

Other

Definition at line 245 of file libusb.h.

Request type bits of the bmRequestType field in control transfers.

Enumerator
LIBUSB_REQUEST_TYPE_STANDARD 

Standard

LIBUSB_REQUEST_TYPE_CLASS 

Class

LIBUSB_REQUEST_TYPE_VENDOR 

Vendor

LIBUSB_REQUEST_TYPE_RESERVED 

Reserved

Definition at line 227 of file libusb.h.

Standard requests, as defined in table 9-3 of the USB2 specifications

Enumerator
LIBUSB_REQUEST_GET_STATUS 

Request status of the specific recipient

LIBUSB_REQUEST_CLEAR_FEATURE 

Clear or disable a specific feature

LIBUSB_REQUEST_SET_FEATURE 

Set or enable a specific feature

LIBUSB_REQUEST_SET_ADDRESS 

Set device address for all future accesses

LIBUSB_REQUEST_GET_DESCRIPTOR 

Get the specified descriptor

LIBUSB_REQUEST_SET_DESCRIPTOR 

Used to update existing descriptors or add new descriptors

LIBUSB_REQUEST_GET_CONFIGURATION 

Get the current device configuration value

LIBUSB_REQUEST_SET_CONFIGURATION 

Set device configuration

LIBUSB_REQUEST_GET_INTERFACE 

Return the selected alternate setting for the specified interface

LIBUSB_REQUEST_SET_INTERFACE 

Select an alternate interface for the specified interface

LIBUSB_REQUEST_SYNCH_FRAME 

Set then report an endpoint's synchronization frame

Definition at line 184 of file libusb.h.

libusb_transfer.flags values

Enumerator
LIBUSB_TRANSFER_SHORT_NOT_OK 

Report short frames as errors

LIBUSB_TRANSFER_FREE_BUFFER 

Automatically free() transfer buffer during libusb_free_transfer()

LIBUSB_TRANSFER_FREE_TRANSFER 

Automatically call libusb_free_transfer() after callback returns. If this flag is set, it is illegal to call libusb_free_transfer() from your transfer callback, as this will result in a double-free when this flag is acted upon.

Definition at line 670 of file libusb.h.

Transfer status codes

Enumerator
LIBUSB_TRANSFER_COMPLETED 

Transfer completed without error. Note that this does not indicate that the entire amount of requested data was transferred.

LIBUSB_TRANSFER_ERROR 

Transfer failed

LIBUSB_TRANSFER_TIMED_OUT 

Transfer timed out

LIBUSB_TRANSFER_CANCELLED 

Transfer was cancelled

LIBUSB_TRANSFER_STALL 

For bulk/interrupt endpoints: halt condition detected (endpoint stalled). For control endpoints: control request not supported.

LIBUSB_TRANSFER_NO_DEVICE 

Device was disconnected

LIBUSB_TRANSFER_OVERFLOW 

Device sent more data than requested

Definition at line 643 of file libusb.h.

Endpoint transfer type. Values for bits 0:1 of the endpoint attributes field.

Enumerator
LIBUSB_TRANSFER_TYPE_CONTROL 

Control endpoint

LIBUSB_TRANSFER_TYPE_ISOCHRONOUS 

Isochronous endpoint

LIBUSB_TRANSFER_TYPE_BULK 

Bulk endpoint

LIBUSB_TRANSFER_TYPE_INTERRUPT 

Interrupt endpoint

Definition at line 168 of file libusb.h.

Function Documentation

struct libusb_transfer* libusb_alloc_transfer ( int  iso_packets)
int libusb_attach_kernel_driver ( libusb_device_handle dev,
int  interface 
)
int libusb_bulk_transfer ( libusb_device_handle dev_handle,
unsigned char  endpoint,
unsigned char *  data,
int  length,
int *  actual_length,
unsigned int  timeout 
)
int libusb_cancel_transfer ( struct libusb_transfer transfer)
int libusb_claim_interface ( libusb_device_handle dev,
int  iface 
)
int libusb_clear_halt ( libusb_device_handle dev,
unsigned char  endpoint 
)
void libusb_close ( libusb_device_handle dev_handle)
int libusb_control_transfer ( libusb_device_handle dev_handle,
uint8_t  request_type,
uint8_t  request,
uint16_t  value,
uint16_t  index,
unsigned char *  data,
uint16_t  length,
unsigned int  timeout 
)
int libusb_detach_kernel_driver ( libusb_device_handle dev,
int  interface 
)
int libusb_event_handler_active ( libusb_context ctx)
int libusb_event_handling_ok ( libusb_context ctx)
void libusb_exit ( libusb_context ctx)
void libusb_free_config_descriptor ( struct libusb_config_descriptor config)
void libusb_free_device_list ( libusb_device **  list,
int  unref_devices 
)
void libusb_free_transfer ( struct libusb_transfer transfer)
int libusb_get_active_config_descriptor ( libusb_device dev,
struct libusb_config_descriptor **  config 
)
uint8_t libusb_get_bus_number ( libusb_device dev)
int libusb_get_config_descriptor ( libusb_device dev,
uint8_t  config_index,
struct libusb_config_descriptor **  config 
)
int libusb_get_config_descriptor_by_value ( libusb_device dev,
uint8_t  bConfigurationValue,
struct libusb_config_descriptor **  config 
)
int libusb_get_configuration ( libusb_device_handle dev,
int *  config 
)
libusb_device* libusb_get_device ( libusb_device_handle dev_handle)
uint8_t libusb_get_device_address ( libusb_device dev)
int libusb_get_device_descriptor ( libusb_device dev,
struct libusb_device_descriptor desc 
)
ssize_t libusb_get_device_list ( libusb_context ctx,
libusb_device ***  list 
)
int libusb_get_max_iso_packet_size ( libusb_device dev,
unsigned char  endpoint 
)
int libusb_get_max_packet_size ( libusb_device dev,
unsigned char  endpoint 
)
int libusb_get_next_timeout ( libusb_context ctx,
struct timeval *  tv 
)
const struct libusb_pollfd** libusb_get_pollfds ( libusb_context ctx)
int libusb_get_string_descriptor_ascii ( libusb_device_handle dev,
uint8_t  index,
unsigned char *  data,
int  length 
)
int libusb_handle_events ( libusb_context ctx)
int libusb_handle_events_locked ( libusb_context ctx,
struct timeval *  tv 
)
int libusb_handle_events_timeout ( libusb_context ctx,
struct timeval *  tv 
)
int libusb_init ( libusb_context **  ctx)
int libusb_interrupt_transfer ( libusb_device_handle dev_handle,
unsigned char  endpoint,
unsigned char *  data,
int  length,
int *  actual_length,
unsigned int  timeout 
)
int libusb_kernel_driver_active ( libusb_device_handle dev,
int  interface 
)
void libusb_lock_event_waiters ( libusb_context ctx)
void libusb_lock_events ( libusb_context ctx)
int libusb_open ( libusb_device dev,
libusb_device_handle **  handle 
)
libusb_device_handle* libusb_open_device_with_vid_pid ( libusb_context ctx,
uint16_t  vendor_id,
uint16_t  product_id 
)
int libusb_pollfds_handle_timeouts ( libusb_context ctx)
libusb_device* libusb_ref_device ( libusb_device dev)
int libusb_release_interface ( libusb_device_handle dev,
int  iface 
)
int libusb_reset_device ( libusb_device_handle dev)
int libusb_set_configuration ( libusb_device_handle dev,
int  configuration 
)
void libusb_set_debug ( libusb_context ctx,
int  level 
)
int libusb_set_interface_alt_setting ( libusb_device_handle dev,
int  interface_number,
int  alternate_setting 
)
void libusb_set_pollfd_notifiers ( libusb_context ctx,
libusb_pollfd_added_cb  added_cb,
libusb_pollfd_removed_cb  removed_cb,
void *  user_data 
)
int libusb_submit_transfer ( struct libusb_transfer transfer)
int libusb_try_lock_events ( libusb_context ctx)
void libusb_unlock_event_waiters ( libusb_context ctx)
void libusb_unlock_events ( libusb_context ctx)
void libusb_unref_device ( libusb_device dev)
int libusb_wait_for_event ( libusb_context ctx,
struct timeval *  tv 
)