30 #if !defined(__cplusplus) 31 #define inline __inline 35 typedef SSIZE_T ssize_t;
40 #include <sys/types.h> 41 #if !defined(_MSC_VER) 46 #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) 47 #define ZERO_SIZED_ARRAY 49 #define ZERO_SIZED_ARRAY 0 57 #if defined(_WIN32) || defined(__CYGWIN__) 59 #if defined(interface) 62 #if !defined(__CYGWIN__) 67 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) 68 #define LIBUSB_DEPRECATED_FOR(f) __attribute__ ((deprecated ("Use " #f " instead"))) 69 #elif defined(__GNUC__) && (__GNUC__ >= 3) 70 #define LIBUSB_DEPRECATED_FOR(f) __attribute__ ((deprecated)) 72 #define LIBUSB_DEPRECATED_FOR(f) 76 #define LIBUSB_PACKED __attribute__ ((packed)) 113 #if defined(_WIN32) || defined(__CYGWIN__) 114 #define LIBUSB_CALL WINAPI 139 #define LIBUSB_API_VERSION 0x01000108 142 #define LIBUSBX_API_VERSION LIBUSB_API_VERSION 144 #if defined(__cplusplus) 156 static inline uint16_t libusb_cpu_to_le16(
const uint16_t x)
162 _tmp.b8[1] = (uint8_t) (x >> 8);
163 _tmp.b8[0] = (uint8_t) (x & 0xff);
175 #define libusb_le16_to_cpu libusb_cpu_to_le16 202 LIBUSB_CLASS_PTP = 0x06,
285 #define LIBUSB_DT_DEVICE_SIZE 18 286 #define LIBUSB_DT_CONFIG_SIZE 9 287 #define LIBUSB_DT_INTERFACE_SIZE 9 288 #define LIBUSB_DT_ENDPOINT_SIZE 7 289 #define LIBUSB_DT_ENDPOINT_AUDIO_SIZE 9 290 #define LIBUSB_DT_HUB_NONVAR_SIZE 7 291 #define LIBUSB_DT_SS_ENDPOINT_COMPANION_SIZE 6 292 #define LIBUSB_DT_BOS_SIZE 5 293 #define LIBUSB_DT_DEVICE_CAPABILITY_SIZE 3 296 #define LIBUSB_BT_USB_2_0_EXTENSION_SIZE 7 297 #define LIBUSB_BT_SS_USB_DEVICE_CAPABILITY_SIZE 10 298 #define LIBUSB_BT_CONTAINER_ID_SIZE 20 301 #define LIBUSB_DT_BOS_MAX_SIZE \ 302 (LIBUSB_DT_BOS_SIZE + \ 303 LIBUSB_BT_USB_2_0_EXTENSION_SIZE + \ 304 LIBUSB_BT_SS_USB_DEVICE_CAPABILITY_SIZE + \ 305 LIBUSB_BT_CONTAINER_ID_SIZE) 307 #define LIBUSB_ENDPOINT_ADDRESS_MASK 0x0f 308 #define LIBUSB_ENDPOINT_DIR_MASK 0x80 322 #define LIBUSB_TRANSFER_TYPE_MASK 0x03 426 #define LIBUSB_ISO_SYNC_TYPE_MASK 0x0c 447 #define LIBUSB_ISO_USAGE_TYPE_MASK 0x30 780 uint8_t dev_capability_data[ZERO_SIZED_ARRAY];
899 uint8_t ContainerID[16];
904 #if defined(_MSC_VER) 905 #pragma pack(push, 1) 932 #if defined(_MSC_VER) 936 #define LIBUSB_CONTROL_SETUP_SIZE (sizeof(struct libusb_control_setup)) 1092 #define LIBUSB_ERROR_COUNT 14 1423 int interface_number);
1425 int interface_number);
1431 int interface_number,
int alternate_setting);
1437 uint32_t num_streams,
unsigned char *endpoints,
int num_endpoints);
1439 unsigned char *endpoints,
int num_endpoints);
1444 unsigned char *buffer,
size_t length);
1447 int interface_number);
1449 int interface_number);
1451 int interface_number);
1469 static inline unsigned char *libusb_control_transfer_get_data(
1472 return transfer->
buffer + LIBUSB_CONTROL_SETUP_SIZE;
1516 static inline void libusb_fill_control_setup(
unsigned char *buffer,
1523 setup->
wValue = libusb_cpu_to_le16(wValue);
1524 setup->
wIndex = libusb_cpu_to_le16(wIndex);
1525 setup->
wLength = libusb_cpu_to_le16(wLength);
1565 static inline void libusb_fill_control_transfer(
1575 transfer->
buffer = buffer;
1577 transfer->
length = (int) (LIBUSB_CONTROL_SETUP_SIZE
1596 static inline void libusb_fill_bulk_transfer(
struct libusb_transfer *transfer,
1598 unsigned char *buffer,
int length, libusb_transfer_cb_fn callback,
1599 void *user_data,
unsigned int timeout)
1605 transfer->
buffer = buffer;
1606 transfer->
length = length;
1627 static inline void libusb_fill_bulk_stream_transfer(
1629 unsigned char endpoint, uint32_t stream_id,
1630 unsigned char *buffer,
int length, libusb_transfer_cb_fn callback,
1631 void *user_data,
unsigned int timeout)
1633 libusb_fill_bulk_transfer(transfer, dev_handle, endpoint, buffer,
1634 length, callback, user_data, timeout);
1652 static inline void libusb_fill_interrupt_transfer(
1654 unsigned char endpoint,
unsigned char *buffer,
int length,
1655 libusb_transfer_cb_fn callback,
void *user_data,
unsigned int timeout)
1661 transfer->
buffer = buffer;
1662 transfer->
length = length;
1681 static inline void libusb_fill_iso_transfer(
struct libusb_transfer *transfer,
1683 unsigned char *buffer,
int length,
int num_iso_packets,
1684 libusb_transfer_cb_fn callback,
void *user_data,
unsigned int timeout)
1690 transfer->
buffer = buffer;
1691 transfer->
length = length;
1705 static inline void libusb_set_iso_packet_lengths(
1730 static inline unsigned char *libusb_get_iso_packet_buffer(
1740 if (packet > INT_MAX)
1742 _packet = (int) packet;
1747 for (i = 0; i < _packet; i++)
1750 return transfer->
buffer + offset;
1772 static inline unsigned char *libusb_get_iso_packet_buffer_simple(
1780 if (packet > INT_MAX)
1782 _packet = (int) packet;
1793 uint8_t request_type, uint8_t bRequest, uint16_t wValue, uint16_t wIndex,
1794 unsigned char *data, uint16_t wLength,
unsigned int timeout);
1797 unsigned char endpoint,
unsigned char *data,
int length,
1798 int *actual_length,
unsigned int timeout);
1801 unsigned char endpoint,
unsigned char *data,
int length,
1802 int *actual_length,
unsigned int timeout);
1817 uint8_t desc_type, uint8_t desc_index,
unsigned char *data,
int length)
1821 0, data, (uint16_t) length, 1000);
1839 uint8_t desc_index, uint16_t langid,
unsigned char *data,
int length)
1843 langid, data, (uint16_t) length, 1000);
1847 uint8_t desc_index,
unsigned char *data,
int length);
1862 struct timeval *tv);
1864 struct timeval *tv,
int *completed);
1868 struct timeval *tv);
1871 struct timeval *tv);
1959 #define LIBUSB_HOTPLUG_NO_FLAGS 0 1963 #define LIBUSB_HOTPLUG_MATCH_ANY -1 2026 int events,
int flags,
2027 int vendor_id,
int product_id,
int dev_class,
2029 libusb_hotplug_callback_handle *callback_handle);
2043 libusb_hotplug_callback_handle callback_handle);
2054 libusb_hotplug_callback_handle callback_handle);
2095 #if defined(__cplusplus) const char * describe
Definition: libusb.h:964
uint16_t bU2DevExitLat
Definition: libusb.h:873
uint8_t bFunctionalitySupport
Definition: libusb.h:867
uint8_t bInterfaceNumber
Definition: libusb.h:637
uint8_t bSynchAddress
Definition: libusb.h:612
Definition: libusb.h:1308
Definition: libusb.h:1022
void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level)
Definition: core.c:2117
Definition: libusb.h:1046
Definition: libusb.h:1134
int LIBUSB_CALL libusb_get_max_iso_packet_size(libusb_device *dev, unsigned char endpoint)
Definition: core.c:1124
uint8_t bmAttributes
Definition: libusb.h:599
Definition: libusb.h:1019
int LIBUSB_CALL libusb_has_capability(uint32_t capability)
Definition: core.c:2473
int LIBUSB_CALL libusb_get_string_descriptor_ascii(libusb_device_handle *dev_handle, uint8_t desc_index, unsigned char *data, int length)
Definition: descriptor.c:1103
uint8_t bReserved
Definition: libusb.h:896
uint8_t bNumConfigurations
Definition: libusb.h:571
uint8_t bRequest
Definition: libusb.h:920
Definition: libusb.h:1082
int LIBUSB_CALL libusb_handle_events_locked(libusb_context *ctx, struct timeval *tv)
Definition: io.c:2464
Definition: libusbi.h:301
void LIBUSB_CALL libusb_free_usb_2_0_extension_descriptor(struct libusb_usb_2_0_extension_descriptor *usb_2_0_extension)
Definition: descriptor.c:975
const uint16_t nano
Definition: libusb.h:958
uint8_t bDevCapabilityType
Definition: libusb.h:893
Definition: libusb.h:1104
uint8_t bLength
Definition: libusb.h:769
void LIBUSB_CALL libusb_hotplug_deregister_callback(libusb_context *ctx, libusb_hotplug_callback_handle callback_handle)
Definition: hotplug.c:319
uint8_t bDeviceSubClass
Definition: libusb.h:543
ssize_t LIBUSB_CALL libusb_get_device_list(libusb_context *ctx, libusb_device ***list)
Definition: core.c:830
libusb_class_code
Definition: libusb.h:181
#define libusb_le16_to_cpu
Definition: libusb.h:175
int LIBUSB_CALL libusb_get_ss_usb_device_capability_descriptor(libusb_context *ctx, struct libusb_bos_dev_capability_descriptor *dev_cap, struct libusb_ss_usb_device_capability_descriptor **ss_usb_device_cap)
Definition: descriptor.c:994
uint8_t bDescriptorType
Definition: libusb.h:774
int LIBUSB_CALL libusb_get_port_path(libusb_context *ctx, libusb_device *dev, uint8_t *path, uint8_t path_length)
Definition: core.c:982
uint8_t bInterval
Definition: libusb.h:605
uint8_t bLength
Definition: libusb.h:527
int LIBUSB_CALL libusb_set_interface_alt_setting(libusb_device_handle *dev_handle, int interface_number, int alternate_setting)
Definition: core.c:1766
libusb_endpoint_direction
Definition: libusb.h:314
uint8_t bDeviceClass
Definition: libusb.h:539
Definition: libusb.h:1070
libusb_ss_usb_device_capability_attributes
Definition: libusb.h:498
short events
Definition: libusb.h:1884
int extra_length
Definition: libusb.h:619
uint8_t flags
Definition: libusb.h:1224
int LIBUSB_CALL libusb_get_bos_descriptor(libusb_device_handle *dev_handle, struct libusb_bos_descriptor **bos)
Definition: descriptor.c:864
Definition: libusb.h:1332
Definition: libusb.h:1954
uint8_t bmAttributes
Definition: libusb.h:755
int LIBUSB_CALL libusb_try_lock_events(libusb_context *ctx)
Definition: io.c:1778
Definition: libusb.h:1296
uint8_t bDescriptorType
Definition: libusb.h:586
Definition: libusb.h:1184
uint8_t iSerialNumber
Definition: libusb.h:568
libusb_option
Definition: libusb.h:2059
int LIBUSB_CALL libusb_get_max_packet_size(libusb_device *dev, unsigned char endpoint)
Definition: core.c:1069
Definition: libusb.h:1101
uint8_t bLength
Definition: libusb.h:629
int LIBUSB_CALL libusb_detach_kernel_driver(libusb_device_handle *dev_handle, int interface_number)
Definition: core.c:2027
int LIBUSB_CALL libusb_get_device_speed(libusb_device *dev)
Definition: core.c:1023
Definition: libusb.h:1052
int LIBUSB_CALL libusb_wrap_sys_device(libusb_context *ctx, intptr_t sys_dev, libusb_device_handle **dev_handle)
Definition: core.c:1249
Definition: libusb.h:1876
uint8_t bNumInterfaces
Definition: libusb.h:703
libusb_speed
Definition: libusb.h:1017
Definition: libusb.h:1944
Definition: libusb.h:1076
int LIBUSB_CALL libusb_free_streams(libusb_device_handle *dev_handle, unsigned char *endpoints, int num_endpoints)
Definition: core.c:1900
libusb_iso_sync_type
Definition: libusb.h:433
uint8_t bmAttributes
Definition: libusb.h:857
libusb_device *LIBUSB_CALL libusb_get_device(libusb_device_handle *dev_handle)
Definition: core.c:1529
Definition: libusb.h:1311
int LIBUSB_CALL libusb_control_transfer(libusb_device_handle *dev_handle, uint8_t request_type, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, unsigned char *data, uint16_t wLength, unsigned int timeout)
Definition: sync.c:97
uint16_t bcdDevice
Definition: libusb.h:559
int LIBUSB_CALL libusb_reset_device(libusb_device_handle *dev_handle)
Definition: core.c:1837
unsigned char * buffer
Definition: libusb.h:1270
uint8_t bDeviceProtocol
Definition: libusb.h:547
Definition: libusb.h:1939
Definition: libusb.h:1320
Definition: libusb.h:1055
Definition: libusb.h:1061
int LIBUSB_CALL libusb_attach_kernel_driver(libusb_device_handle *dev_handle, int interface_number)
Definition: core.c:2064
Definition: libusb.h:1049
Definition: libusb.h:1287
uint16_t wMaxPacketSize
Definition: libusb.h:602
uint8_t bDevCapabilityType
Definition: libusb.h:851
const unsigned char * extra
Definition: libusb.h:616
libusb_standard_request
Definition: libusb.h:344
Definition: libusb.h:1025
int fd
Definition: libusb.h:1878
int LIBUSB_CALL libusb_get_next_timeout(libusb_context *ctx, struct timeval *tv)
Definition: io.c:2542
uint8_t iManufacturer
Definition: libusb.h:562
Definition: libusb.h:1034
uint8_t iInterface
Definition: libusb.h:658
Definition: libusb.h:1219
Definition: libusb.h:1159
int LIBUSB_CALL libusb_pollfds_handle_timeouts(libusb_context *ctx)
Definition: io.c:2508
libusb_descriptor_type
Definition: libusb.h:243
Definition: libusb.h:1028
unsigned int timeout
Definition: libusb.h:1234
int LIBUSB_CALL libusb_get_configuration(libusb_device_handle *dev, int *config)
Definition: core.c:1554
void LIBUSB_CALL libusb_free_ss_usb_device_capability_descriptor(struct libusb_ss_usb_device_capability_descriptor *ss_usb_device_cap)
Definition: descriptor.c:1031
libusb_bos_type
Definition: libusb.h:506
uint8_t bDevCapabilityType
Definition: libusb.h:777
int LIBUSB_CALL libusb_claim_interface(libusb_device_handle *dev_handle, int interface_number)
Definition: core.c:1677
libusb_transfer_cb_fn callback
Definition: libusb.h:1255
const uint16_t minor
Definition: libusb.h:952
const unsigned char * extra
Definition: libusb.h:726
int LIBUSB_CALL libusb_setlocale(const char *locale)
Definition: strerror.c:178
int LIBUSB_CALL libusb_set_auto_detach_kernel_driver(libusb_device_handle *dev_handle, int enable)
Definition: core.c:2103
void LIBUSB_CALL libusb_unlock_events(libusb_context *ctx)
Definition: io.c:1836
const char *LIBUSB_CALL libusb_strerror(int errcode)
Definition: strerror.c:213
Definition: libusb.h:1079
uint8_t bmRequestType
Definition: libusb.h:913
void LIBUSB_CALL libusb_close(libusb_device_handle *dev_handle)
Definition: core.c:1467
libusb_transfer_type
Definition: libusb.h:1096
uint8_t bLength
Definition: libusb.h:581
uint8_t bEndpointAddress
Definition: libusb.h:591
void LIBUSB_CALL libusb_unlock_event_waiters(libusb_context *ctx)
Definition: io.c:1976
Definition: libusb.h:1064
unsigned char *LIBUSB_CALL libusb_dev_mem_alloc(libusb_device_handle *dev_handle, size_t length)
Definition: core.c:1943
Definition: libusb.h:1088
void LIBUSB_CALL libusb_lock_event_waiters(libusb_context *ctx)
Definition: io.c:1965
const struct libusb_interface * interface
Definition: libusb.h:722
libusb_request_recipient
Definition: libusb.h:412
uint8_t bLength
Definition: libusb.h:740
uint8_t bDescriptorType
Definition: libusb.h:634
libusb_error
Definition: libusb.h:1044
int extra_length
Definition: libusb.h:669
const struct libusb_interface_descriptor * altsetting
Definition: libusb.h:678
struct libusb_iso_packet_descriptor iso_packet_desc[ZERO_SIZED_ARRAY]
Definition: libusb.h:1277
libusb_hotplug_event
Definition: libusb.h:1937
Definition: libusbi.h:460
Definition: libusb.h:2090
libusb_supported_speed
Definition: libusb.h:469
libusb_hotplug_flag
Definition: libusb.h:1952
uint32_t LIBUSB_CALL libusb_transfer_get_stream_id(struct libusb_transfer *transfer)
Definition: io.c:1654
const uint16_t major
Definition: libusb.h:949
uint8_t bU1DevExitLat
Definition: libusb.h:870
int LIBUSB_CALL libusb_handle_events(libusb_context *ctx)
Definition: io.c:2416
libusb_transfer_status
Definition: libusb.h:1115
struct libusb_transfer *LIBUSB_CALL libusb_alloc_transfer(int iso_packets)
Definition: io.c:1296
int LIBUSB_CALL libusb_submit_transfer(struct libusb_transfer *transfer)
Definition: io.c:1502
int LIBUSB_CALL libusb_clear_halt(libusb_device_handle *dev_handle, unsigned char endpoint)
Definition: core.c:1808
Definition: libusb.h:1098
const uint16_t micro
Definition: libusb.h:955
unsigned int actual_length
Definition: libusb.h:1194
int num_altsetting
Definition: libusb.h:682
Definition: libusb.h:1317
libusb_request_type
Definition: libusb.h:394
int libusb_hotplug_callback_handle
Definition: libusb.h:1930
uint8_t bLength
Definition: libusb.h:815
uint8_t bInterfaceClass
Definition: libusb.h:647
int LIBUSB_CALL libusb_event_handler_active(libusb_context *ctx)
Definition: io.c:1900
Definition: libusb.h:1314
void LIBUSB_CALL libusb_free_pollfds(const struct libusb_pollfd **pollfds)
Definition: io.c:2775
void LIBUSB_CALL libusb_exit(libusb_context *ctx)
Definition: core.c:2377
libusb_device *LIBUSB_CALL libusb_ref_device(libusb_device *dev)
Definition: core.c:1179
libusb_log_cb_mode
Definition: libusb.h:1327
Definition: libusb.h:1124
Definition: libusb.h:1067
libusb_iso_usage_type
Definition: libusb.h:454
uint16_t wValue
Definition: libusb.h:923
int LIBUSB_CALL libusb_get_active_config_descriptor(libusb_device *dev, struct libusb_config_descriptor **config)
Definition: descriptor.c:573
const char *LIBUSB_CALL libusb_error_name(int errcode)
Definition: core.c:2702
libusb_device *LIBUSB_CALL libusb_get_parent(libusb_device *dev)
Definition: core.c:1002
void LIBUSB_CALL libusb_unref_device(libusb_device *dev)
Definition: core.c:1192
int LIBUSB_CALL libusb_alloc_streams(libusb_device_handle *dev_handle, uint32_t num_streams, unsigned char *endpoints, int num_endpoints)
Definition: core.c:1870
int LIBUSB_CALL libusb_init(libusb_context **ctx)
Definition: core.c:2266
uint8_t bmAttributes
Definition: libusb.h:712
int LIBUSB_CALL libusb_get_config_descriptor(libusb_device *dev, uint8_t config_index, struct libusb_config_descriptor **config)
Definition: descriptor.c:614
int LIBUSB_CALL libusb_set_configuration(libusb_device_handle *dev_handle, int configuration)
Definition: core.c:1640
uint8_t bDescriptorType
Definition: libusb.h:697
int length
Definition: libusb.h:1246
Definition: libusb.h:1147
void * user_data
Definition: libusb.h:1267
uint8_t bNumEndpoints
Definition: libusb.h:644
uint16_t wIndex
Definition: libusb.h:927
int LIBUSB_CALL libusb_open(libusb_device *dev, libusb_device_handle **dev_handle)
Definition: core.c:1308
int LIBUSB_CALL libusb_get_port_numbers(libusb_device *dev, uint8_t *port_numbers, int port_numbers_len)
Definition: core.c:956
Definition: libusb.h:1118
uint8_t bDevCapabilityType
Definition: libusb.h:825
typedef void(LIBUSB_CALL *libusb_transfer_cb_fn)(struct libusb_transfer *transfer)
uint8_t bDescriptorType
Definition: libusb.h:846
uint8_t bLength
Definition: libusb.h:790
int(LIBUSB_CALL * libusb_hotplug_callback_fn)(libusb_context *ctx, libusb_device *device, libusb_hotplug_event event, void *user_data)
Definition: libusb.h:1987
Definition: libusbi.h:439
Definition: libusb.h:1031
void LIBUSB_CALL libusb_free_container_id_descriptor(struct libusb_container_id_descriptor *container_id)
Definition: descriptor.c:1085
Definition: libusb.h:1121
int LIBUSB_CALL libusb_cancel_transfer(struct libusb_transfer *transfer)
Definition: io.c:1593
uint8_t bDescriptorType
Definition: libusb.h:888
libusb_device_handle * dev_handle
Definition: libusb.h:1221
uint8_t bDescriptorType
Definition: libusb.h:820
uint8_t bNumDeviceCaps
Definition: libusb.h:802
uint16_t wTotalLength
Definition: libusb.h:700
uint16_t idProduct
Definition: libusb.h:556
uint16_t wTotalLength
Definition: libusb.h:798
int LIBUSB_CALL libusb_get_config_descriptor_by_value(libusb_device *dev, uint8_t bConfigurationValue, struct libusb_config_descriptor **config)
Definition: descriptor.c:660
int LIBUSB_CALL libusb_get_ss_endpoint_companion_descriptor(libusb_context *ctx, const struct libusb_endpoint_descriptor *endpoint, struct libusb_ss_endpoint_companion_descriptor **ep_comp)
Definition: descriptor.c:723
int LIBUSB_CALL libusb_set_option(libusb_context *ctx, enum libusb_option option,...)
Definition: core.c:2195
void LIBUSB_CALL libusb_free_transfer(struct libusb_transfer *transfer)
Definition: io.c:1344
void LIBUSB_CALL libusb_set_pollfd_notifiers(libusb_context *ctx, libusb_pollfd_added_cb added_cb, libusb_pollfd_removed_cb removed_cb, void *user_data)
Definition: io.c:2619
uint16_t wLength
Definition: libusb.h:930
uint16_t idVendor
Definition: libusb.h:553
uint8_t bInterfaceSubClass
Definition: libusb.h:651
int LIBUSB_CALL libusb_handle_events_timeout(libusb_context *ctx, struct timeval *tv)
Definition: io.c:2396
Definition: libusb.h:1300
uint8_t bLength
Definition: libusb.h:841
uint8_t bConfigurationValue
Definition: libusb.h:706
int LIBUSB_CALL libusb_bulk_transfer(libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *data, int length, int *actual_length, unsigned int timeout)
Definition: sync.c:274
Definition: libusb.h:1058
int num_iso_packets
Definition: libusb.h:1274
libusb_transfer_flags
Definition: libusb.h:1145
void(LIBUSB_CALL * libusb_log_cb)(libusb_context *ctx, enum libusb_log_level level, const char *str)
Definition: libusb.h:1343
Definition: libusb.h:1107
Definition: sunos_usb.h:37
int actual_length
Definition: libusb.h:1251
uint8_t bDescriptorType
Definition: libusb.h:532
int LIBUSB_CALL libusb_get_usb_2_0_extension_descriptor(libusb_context *ctx, struct libusb_bos_dev_capability_descriptor *dev_cap, struct libusb_usb_2_0_extension_descriptor **usb_2_0_extension)
Definition: descriptor.c:939
uint8_t bLength
Definition: libusb.h:692
int LIBUSB_CALL libusb_handle_events_completed(libusb_context *ctx, int *completed)
Definition: io.c:2438
void LIBUSB_CALL libusb_lock_events(libusb_context *ctx)
Definition: io.c:1821
libusb_endpoint_transfer_type
Definition: libusb.h:328
void(LIBUSB_CALL * libusb_pollfd_added_cb)(int fd, short events, void *user_data)
Definition: libusb.h:1897
Definition: libusb.h:1127
Definition: libusb.h:1131
uint8_t bMaxPacketSize0
Definition: libusb.h:550
int LIBUSB_CALL libusb_interrupt_transfer(libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *data, int length, int *actual_length, unsigned int timeout)
Definition: sync.c:328
uint8_t iProduct
Definition: libusb.h:565
Definition: libusb.h:2081
void LIBUSB_CALL libusb_interrupt_event_handler(libusb_context *ctx)
Definition: io.c:1929
void(LIBUSB_CALL * libusb_pollfd_removed_cb)(int fd, void *user_data)
Definition: libusb.h:1909
uint8_t bLength
Definition: libusb.h:883
int LIBUSB_CALL libusb_handle_events_timeout_completed(libusb_context *ctx, struct timeval *tv, int *completed)
Definition: io.c:2327
uint8_t bDescriptorType
Definition: libusb.h:795
libusb_capability
Definition: libusb.h:1285
Definition: libusb.h:1110
int extra_length
Definition: libusb.h:729
int LIBUSB_CALL libusb_get_device_descriptor(libusb_device *dev, struct libusb_device_descriptor *desc)
Definition: descriptor.c:549
uint32_t bmAttributes
Definition: libusb.h:831
uint16_t wBytesPerInterval
Definition: libusb.h:759
uint8_t iConfiguration
Definition: libusb.h:709
void LIBUSB_CALL libusb_free_device_list(libusb_device **list, int unref_devices)
Definition: core.c:900
unsigned int length
Definition: libusb.h:1191
void LIBUSB_CALL libusb_free_ss_endpoint_companion_descriptor(struct libusb_ss_endpoint_companion_descriptor *ep_comp)
Definition: descriptor.c:772
const unsigned char * extra
Definition: libusb.h:666
uint8_t bAlternateSetting
Definition: libusb.h:640
libusb_log_level
Definition: libusb.h:1306
Definition: libusb.h:1137
Definition: libusb.h:1073
int LIBUSB_CALL libusb_kernel_driver_active(libusb_device_handle *dev_handle, int interface_number)
Definition: core.c:1989
unsigned char endpoint
Definition: libusb.h:1227
const struct libusb_version *LIBUSB_CALL libusb_get_version(void)
Definition: core.c:2757
int LIBUSB_CALL libusb_hotplug_register_callback(libusb_context *ctx, int events, int flags, int vendor_id, int product_id, int dev_class, libusb_hotplug_callback_fn cb_fn, void *user_data, libusb_hotplug_callback_handle *callback_handle)
Definition: hotplug.c:231
uint8_t bInterfaceProtocol
Definition: libusb.h:655
const struct libusb_pollfd **LIBUSB_CALL libusb_get_pollfds(libusb_context *ctx)
Definition: io.c:2727
Definition: libusb.h:1153
uint16_t bcdUSB
Definition: libusb.h:536
int LIBUSB_CALL libusb_release_interface(libusb_device_handle *dev_handle, int interface_number)
Definition: core.c:1721
uint8_t bMaxBurst
Definition: libusb.h:749
uint16_t wSpeedSupported
Definition: libusb.h:861
int LIBUSB_CALL libusb_dev_mem_free(libusb_device_handle *dev_handle, unsigned char *buffer, size_t length)
Definition: core.c:1963
const struct libusb_endpoint_descriptor * endpoint
Definition: libusb.h:662
int LIBUSB_CALL libusb_event_handling_ok(libusb_context *ctx)
Definition: io.c:1871
void *LIBUSB_CALL libusb_hotplug_get_user_data(libusb_context *ctx, libusb_hotplug_callback_handle callback_handle)
Definition: hotplug.c:357
void LIBUSB_CALL libusb_free_bos_descriptor(struct libusb_bos_descriptor *bos)
Definition: descriptor.c:914
#define LIBUSB_CALL
Definition: libusb.h:116
uint8_t LIBUSB_CALL libusb_get_device_address(libusb_device *dev)
Definition: core.c:1012
Definition: libusb.h:1189
uint8_t LIBUSB_CALL libusb_get_bus_number(libusb_device *dev)
Definition: core.c:921
void LIBUSB_CALL libusb_transfer_set_stream_id(struct libusb_transfer *transfer, uint32_t stream_id)
Definition: io.c:1637
uint8_t bDescriptorType
Definition: libusb.h:745
const char * rc
Definition: libusb.h:961
void LIBUSB_CALL libusb_set_log_cb(libusb_context *ctx, libusb_log_cb cb, int mode)
Definition: core.c:2152
Definition: libusb.h:1290
uint8_t LIBUSB_CALL libusb_get_port_number(libusb_device *dev)
Definition: core.c:940
int LIBUSB_CALL libusb_wait_for_event(libusb_context *ctx, struct timeval *tv)
Definition: io.c:2007
uint8_t MaxPower
Definition: libusb.h:718
int LIBUSB_CALL libusb_get_container_id_descriptor(libusb_context *ctx, struct libusb_bos_dev_capability_descriptor *dev_cap, struct libusb_container_id_descriptor **container_id)
Definition: descriptor.c:1050
unsigned char type
Definition: libusb.h:1230
void LIBUSB_CALL libusb_free_config_descriptor(struct libusb_config_descriptor *config)
Definition: descriptor.c:700
Definition: libusb.h:1329
uint8_t bRefresh
Definition: libusb.h:609
libusb_usb_2_0_extension_attributes
Definition: libusb.h:488
libusb_device_handle *LIBUSB_CALL libusb_open_device_with_vid_pid(libusb_context *ctx, uint16_t vendor_id, uint16_t product_id)
Definition: core.c:1367