Classes | Macros | Typedefs | Enumerations | Functions
libusb.h File Reference
#include <unistd.h>
#include <stdint.h>
#include <sys/time.h>
Include dependency graph for libusb.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  libusb_device_descriptor
 
struct  libusb_iso_packet_descriptor
 
struct  libusb_transfer
 

Macros

#define LIBUSBEMU   1
 

Typedefs

typedef struct libusb_context_t libusb_context
 
typedef struct libusb_device_t libusb_device
 
typedef struct libusb_device_handle_t libusb_device_handle
 
typedef void(* libusb_transfer_cb_fn) (struct libusb_transfer *transfer)
 

Enumerations

enum  libusb_endpoint_direction { LIBUSB_ENDPOINT_IN = 0x80, LIBUSB_ENDPOINT_OUT = 0x00 }
 
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_flags { LIBUSB_TRANSFER_SHORT_NOT_OK = 1<<0, LIBUSB_TRANSFER_FREE_BUFFER = 1<<1, LIBUSB_TRANSFER_FREE_TRANSFER = 1<<2 }
 
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_type { LIBUSB_TRANSFER_TYPE_CONTROL = 0, LIBUSB_TRANSFER_TYPE_ISOCHRONOUS = 1, LIBUSB_TRANSFER_TYPE_BULK = 2, LIBUSB_TRANSFER_TYPE_INTERRUPT = 3 }
 

Functions

struct libusb_transferlibusb_alloc_transfer (int iso_packets)
 
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 interface_number)
 
void libusb_close (libusb_device_handle *dev_handle)
 
int libusb_control_transfer (libusb_device_handle *dev_handle, uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, unsigned char *data, uint16_t wLength, unsigned int timeout)
 
void libusb_exit (libusb_context *ctx)
 
void libusb_fill_iso_transfer (struct libusb_transfer *transfer, libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *buffer, int length, int num_iso_packets, libusb_transfer_cb_fn callback, void *user_data, unsigned int timeout)
 
void libusb_free_device_list (libusb_device **list, int unref_devices)
 
void libusb_free_transfer (struct libusb_transfer *transfer)
 
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_string_descriptor (libusb_device_handle *dev_handle, uint8_t desc_index, uint16_t langid, unsigned char *data, int length)
 
int libusb_get_string_descriptor_ascii (libusb_device_handle *dev_handle, uint8_t desc_index, unsigned char *data, int length)
 
int libusb_handle_events (libusb_context *ctx)
 
int libusb_handle_events_timeout (libusb_context *ctx, struct timeval *timeout)
 
int libusb_init (libusb_context **context)
 
int libusb_open (libusb_device *dev, libusb_device_handle **handle)
 
libusb_device_handlelibusb_open_device_with_vid_pid (libusb_context *ctx, uint16_t vendor_id, uint16_t product_id)
 
int libusb_release_interface (libusb_device_handle *dev, int interface_number)
 
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_iso_packet_lengths (struct libusb_transfer *transfer, unsigned int length)
 
int libusb_submit_transfer (struct libusb_transfer *transfer)
 

Macro Definition Documentation

#define LIBUSBEMU   1

Definition at line 48 of file libusb.h.

Typedef Documentation

Definition at line 59 of file libusb.h.

Definition at line 65 of file libusb.h.

Definition at line 72 of file libusb.h.

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

Definition at line 94 of file libusb.h.

Enumeration Type Documentation

Enumerator
LIBUSB_ENDPOINT_IN 
LIBUSB_ENDPOINT_OUT 

Definition at line 126 of file libusb.h.

Enumerator
LIBUSB_SUCCESS 
LIBUSB_ERROR_IO 
LIBUSB_ERROR_INVALID_PARAM 
LIBUSB_ERROR_ACCESS 
LIBUSB_ERROR_NO_DEVICE 
LIBUSB_ERROR_NOT_FOUND 
LIBUSB_ERROR_BUSY 
LIBUSB_ERROR_TIMEOUT 
LIBUSB_ERROR_OVERFLOW 
LIBUSB_ERROR_PIPE 
LIBUSB_ERROR_INTERRUPTED 
LIBUSB_ERROR_NO_MEM 
LIBUSB_ERROR_NOT_SUPPORTED 
LIBUSB_ERROR_OTHER 

Definition at line 180 of file libusb.h.

Enumerator
LIBUSB_TRANSFER_SHORT_NOT_OK 
LIBUSB_TRANSFER_FREE_BUFFER 
LIBUSB_TRANSFER_FREE_TRANSFER 

Definition at line 150 of file libusb.h.

Enumerator
LIBUSB_TRANSFER_COMPLETED 
LIBUSB_TRANSFER_ERROR 
LIBUSB_TRANSFER_TIMED_OUT 
LIBUSB_TRANSFER_CANCELLED 
LIBUSB_TRANSFER_STALL 
LIBUSB_TRANSFER_NO_DEVICE 
LIBUSB_TRANSFER_OVERFLOW 

Definition at line 131 of file libusb.h.

Enumerator
LIBUSB_TRANSFER_TYPE_CONTROL 
LIBUSB_TRANSFER_TYPE_ISOCHRONOUS 
LIBUSB_TRANSFER_TYPE_BULK 
LIBUSB_TRANSFER_TYPE_INTERRUPT 

Definition at line 142 of file libusb.h.

Function Documentation

struct libusb_transfer* libusb_alloc_transfer ( int  iso_packets)

Definition at line 439 of file libusbemu.cpp.

int libusb_bulk_transfer ( libusb_device_handle dev_handle,
unsigned char  endpoint,
unsigned char *  data,
int  length,
int *  actual_length,
unsigned int  timeout 
)

Definition at line 412 of file libusbemu.cpp.

int libusb_cancel_transfer ( struct libusb_transfer transfer)

Definition at line 578 of file libusbemu.cpp.

int libusb_claim_interface ( libusb_device_handle dev,
int  interface_number 
)

Definition at line 316 of file libusbemu.cpp.

void libusb_close ( libusb_device_handle dev_handle)

Definition at line 249 of file libusbemu.cpp.

int libusb_control_transfer ( libusb_device_handle dev_handle,
uint8_t  bmRequestType,
uint8_t  bRequest,
uint16_t  wValue,
uint16_t  wIndex,
unsigned char *  data,
uint16_t  wLength,
unsigned int  timeout 
)

Definition at line 394 of file libusbemu.cpp.

void libusb_exit ( libusb_context ctx)

Definition at line 110 of file libusbemu.cpp.

void libusb_fill_iso_transfer ( struct libusb_transfer transfer,
libusb_device_handle dev_handle,
unsigned char  endpoint,
unsigned char *  buffer,
int  length,
int  num_iso_packets,
libusb_transfer_cb_fn  callback,
void *  user_data,
unsigned int  timeout 
)

Definition at line 489 of file libusbemu.cpp.

void libusb_free_device_list ( libusb_device **  list,
int  unref_devices 
)

Definition at line 190 of file libusbemu.cpp.

void libusb_free_transfer ( struct libusb_transfer transfer)

Definition at line 451 of file libusbemu.cpp.

int libusb_get_device_descriptor ( libusb_device dev,
struct libusb_device_descriptor desc 
)

Definition at line 206 of file libusbemu.cpp.

ssize_t libusb_get_device_list ( libusb_context ctx,
libusb_device ***  list 
)

Definition at line 151 of file libusbemu.cpp.

int libusb_get_string_descriptor ( libusb_device_handle dev_handle,
uint8_t  desc_index,
uint16_t  langid,
unsigned char *  data,
int  length 
)

Definition at line 267 of file libusbemu.cpp.

int libusb_get_string_descriptor_ascii ( libusb_device_handle dev_handle,
uint8_t  desc_index,
unsigned char *  data,
int  length 
)

Definition at line 276 of file libusbemu.cpp.

int libusb_handle_events ( libusb_context ctx)

Definition at line 622 of file libusbemu.cpp.

int libusb_handle_events_timeout ( libusb_context ctx,
struct timeval *  timeout 
)

Definition at line 638 of file libusbemu.cpp.

int libusb_init ( libusb_context **  context)

Definition at line 88 of file libusbemu.cpp.

int libusb_open ( libusb_device dev,
libusb_device_handle **  handle 
)

Definition at line 217 of file libusbemu.cpp.

libusb_device_handle* libusb_open_device_with_vid_pid ( libusb_context ctx,
uint16_t  vendor_id,
uint16_t  product_id 
)

Definition at line 362 of file libusbemu.cpp.

int libusb_release_interface ( libusb_device_handle dev,
int  interface_number 
)

Definition at line 347 of file libusbemu.cpp.

int libusb_set_configuration ( libusb_device_handle dev,
int  configuration 
)

Definition at line 286 of file libusbemu.cpp.

void libusb_set_debug ( libusb_context ctx,
int  level 
)

Definition at line 142 of file libusbemu.cpp.

int libusb_set_interface_alt_setting ( libusb_device_handle dev,
int  interface_number,
int  alternate_setting 
)

Definition at line 305 of file libusbemu.cpp.

void libusb_set_iso_packet_lengths ( struct libusb_transfer transfer,
unsigned int  length 
)

Definition at line 516 of file libusbemu.cpp.

int libusb_submit_transfer ( struct libusb_transfer transfer)

Definition at line 529 of file libusbemu.cpp.



libfreenect
Author(s): Hector Martin, Josh Blake, Kyle Machulis, OpenKinect community
autogenerated on Thu Jun 6 2019 19:25:39