Miscellaneous


Defines

#define libusb_cpu_to_le16(x)
 Convert a 16-bit value from host-endian to little-endian format.
#define libusb_le16_to_cpu   libusb_cpu_to_le16
 Convert a 16-bit value from little-endian to host-endian format.

Enumerations

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
}
 Standard requests, as defined in table 9-3 of the USB2 specifications. More...
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) }
 Request type bits of the bmRequestType field in control transfers. More...
enum  libusb_request_recipient { LIBUSB_RECIPIENT_DEVICE = 0x00, LIBUSB_RECIPIENT_INTERFACE = 0x01, LIBUSB_RECIPIENT_ENDPOINT = 0x02, LIBUSB_RECIPIENT_OTHER = 0x03 }
 Recipient bits of the bmRequestType field in control transfers. More...
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
}
 Error codes. More...

Define Documentation

#define libusb_cpu_to_le16 (  ) 

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:
x the host-endian value to convert
Returns:
the value in little-endian byte order

#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:
x the little-endian value to convert
Returns:
the value in host-endian byte order


Enumeration Type Documentation

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.

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.

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.

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.


Generated on Thu Oct 14 14:56:35 2010 for libusb by  doxygen 1.5.9