#include <stdlib.h>
#include <pshpack1.h>
#include <poppack.h>
Go to the source code of this file.
#define LIBUSB_PATH_MAX 512 |
#define USB_CLASS_AUDIO 1 |
#define USB_CLASS_COMM 2 |
#define USB_CLASS_DATA 10 |
#define USB_CLASS_HID 3 |
#define USB_CLASS_HUB 9 |
#define USB_CLASS_MASS_STORAGE 8 |
#define USB_CLASS_PER_INTERFACE 0 |
#define USB_CLASS_PRINTER 7 |
#define USB_CLASS_VENDOR_SPEC 0xff |
#define USB_DT_CONFIG 0x02 |
#define USB_DT_CONFIG_SIZE 9 |
#define USB_DT_DEVICE 0x01 |
#define USB_DT_DEVICE_SIZE 18 |
#define USB_DT_ENDPOINT 0x05 |
#define USB_DT_ENDPOINT_AUDIO_SIZE 9 |
#define USB_DT_ENDPOINT_SIZE 7 |
#define USB_DT_HID 0x21 |
#define USB_DT_HUB 0x29 |
#define USB_DT_HUB_NONVAR_SIZE 7 |
#define USB_DT_INTERFACE 0x04 |
#define USB_DT_INTERFACE_SIZE 9 |
#define USB_DT_PHYSICAL 0x23 |
#define USB_DT_REPORT 0x22 |
#define USB_DT_STRING 0x03 |
#define USB_ENDPOINT_ADDRESS_MASK 0x0f |
#define USB_ENDPOINT_DIR_MASK 0x80 |
#define USB_ENDPOINT_IN 0x80 |
#define USB_ENDPOINT_OUT 0x00 |
#define USB_ENDPOINT_TYPE_BULK 2 |
#define USB_ENDPOINT_TYPE_CONTROL 0 |
#define USB_ENDPOINT_TYPE_INTERRUPT 3 |
#define USB_ENDPOINT_TYPE_ISOCHRONOUS 1 |
#define USB_ENDPOINT_TYPE_MASK 0x03 |
#define USB_ERROR_BEGIN 500000 |
#define USB_LE16_TO_CPU | ( | x | ) |
#define USB_MAXALTSETTING 128 |
#define USB_MAXCONFIG 8 |
#define USB_MAXENDPOINTS 32 |
#define USB_MAXINTERFACES 32 |
#define USB_RECIP_DEVICE 0x00 |
#define USB_RECIP_ENDPOINT 0x02 |
#define USB_RECIP_INTERFACE 0x01 |
#define USB_RECIP_OTHER 0x03 |
#define USB_REQ_CLEAR_FEATURE 0x01 |
#define USB_REQ_GET_CONFIGURATION 0x08 |
#define USB_REQ_GET_DESCRIPTOR 0x06 |
#define USB_REQ_GET_INTERFACE 0x0A |
#define USB_REQ_GET_STATUS 0x00 |
#define USB_REQ_SET_ADDRESS 0x05 |
#define USB_REQ_SET_CONFIGURATION 0x09 |
#define USB_REQ_SET_DESCRIPTOR 0x07 |
#define USB_REQ_SET_FEATURE 0x03 |
#define USB_REQ_SET_INTERFACE 0x0B |
#define USB_REQ_SYNCH_FRAME 0x0C |
#define USB_TYPE_CLASS (0x01 << 5) |
#define USB_TYPE_RESERVED (0x03 << 5) |
#define USB_TYPE_STANDARD (0x00 << 5) |
#define USB_TYPE_VENDOR (0x02 << 5) |
typedef struct usb_dev_handle usb_dev_handle |
int usb_bulk_read | ( | usb_dev_handle * | dev, | |
int | ep, | |||
char * | bytes, | |||
int | size, | |||
int | timeout | |||
) |
int usb_bulk_write | ( | usb_dev_handle * | dev, | |
int | ep, | |||
char * | bytes, | |||
int | size, | |||
int | timeout | |||
) |
int usb_claim_interface | ( | usb_dev_handle * | dev, | |
int | interface | |||
) |
int usb_clear_halt | ( | usb_dev_handle * | dev, | |
unsigned int | ep | |||
) |
int usb_close | ( | usb_dev_handle * | dev | ) |
int usb_control_msg | ( | usb_dev_handle * | dev, | |
int | requesttype, | |||
int | request, | |||
int | value, | |||
int | index, | |||
char * | bytes, | |||
int | size, | |||
int | timeout | |||
) |
struct usb_device* usb_device | ( | usb_dev_handle * | dev | ) | [read] |
int usb_find_busses | ( | void | ) |
int usb_find_devices | ( | void | ) |
struct usb_bus* usb_get_busses | ( | void | ) | [read] |
int usb_get_descriptor | ( | usb_dev_handle * | udev, | |
unsigned char | type, | |||
unsigned char | index, | |||
void * | buf, | |||
int | size | |||
) |
int usb_get_descriptor_by_endpoint | ( | usb_dev_handle * | udev, | |
int | ep, | |||
unsigned char | type, | |||
unsigned char | index, | |||
void * | buf, | |||
int | size | |||
) |
int usb_get_string | ( | usb_dev_handle * | dev, | |
int | index, | |||
int | langid, | |||
char * | buf, | |||
size_t | buflen | |||
) |
int usb_get_string_simple | ( | usb_dev_handle * | dev, | |
int | index, | |||
char * | buf, | |||
size_t | buflen | |||
) |
struct usb_version* usb_get_version | ( | void | ) | [read] |
void usb_init | ( | void | ) |
int usb_interrupt_read | ( | usb_dev_handle * | dev, | |
int | ep, | |||
char * | bytes, | |||
int | size, | |||
int | timeout | |||
) |
int usb_interrupt_write | ( | usb_dev_handle * | dev, | |
int | ep, | |||
char * | bytes, | |||
int | size, | |||
int | timeout | |||
) |
usb_dev_handle* usb_open | ( | struct usb_device * | dev | ) |
int usb_release_interface | ( | usb_dev_handle * | dev, | |
int | interface | |||
) |
int usb_reset | ( | usb_dev_handle * | dev | ) |
int usb_resetep | ( | usb_dev_handle * | dev, | |
unsigned int | ep | |||
) |
int usb_set_altinterface | ( | usb_dev_handle * | dev, | |
int | alternate | |||
) |
int usb_set_configuration | ( | usb_dev_handle * | dev, | |
int | configuration | |||
) |
void usb_set_debug | ( | int | level | ) |
char* usb_strerror | ( | void | ) |
struct usb_bus* usb_busses |