enum libusb_error

Overview

Error codes. Moreā€¦

#include <libusb.h>

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,
};

Detailed Documentation

Error codes.

Most libusb functions return 0 on success or one of these codes on failure. You can call libusb_error_name() to retrieve a string representation of an error code or libusb_strerror() to get an end-user suitable description of an error code.

Enum Values

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.