libusb.h | libusb.h | |||
---|---|---|---|---|
/* | /* | |||
* Public libusbx header file | * Public libusbx header file | |||
* Copyright | * Copyright © 2007-2008 Daniel Drake <dsd@gentoo.org> | |||
* Copyright | * Copyright © 2001 Johannes Erdfelt <johannes@erdfelt.com> | |||
* | * | |||
* This library is free software; you can redistribute it and/or | * This library is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | * modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation; either | * License as published by the Free Software Foundation; either | |||
* version 2.1 of the License, or (at your option) any later version. | * version 2.1 of the License, or (at your option) any later version. | |||
* | * | |||
* This library is distributed in the hope that it will be useful, | * This library is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
* Lesser General Public License for more details. | * Lesser General Public License for more details. | |||
skipping to change at line 951 | skipping to change at line 951 | |||
/** \ingroup misc | /** \ingroup misc | |||
* Capabilities supported by this instance of libusb. Test if the loaded | * Capabilities supported by this instance of libusb. Test if the loaded | |||
* library supports a given capability by calling | * library supports a given capability by calling | |||
* \ref libusb_has_capability(). | * \ref libusb_has_capability(). | |||
*/ | */ | |||
enum libusb_capability { | enum libusb_capability { | |||
/** The libusb_has_capability() API is available. */ | /** The libusb_has_capability() API is available. */ | |||
LIBUSB_CAP_HAS_CAPABILITY = 0, | LIBUSB_CAP_HAS_CAPABILITY = 0, | |||
}; | }; | |||
/** \ingroup lib | ||||
* Log message levels. | ||||
* - LOG_LEVEL_NONE (0) : no messages ever printed by the library (defa | ||||
ult) | ||||
* - LOG_LEVEL_ERROR (1) : error messages are printed to stderr | ||||
* - LOG_LEVEL_WARNING (2) : warning and error messages are printed to std | ||||
err | ||||
* - LOG_LEVEL_INFO (3) : informational messages are printed to stdout, | ||||
warning | ||||
* and error messages are printed to stderr | ||||
* - LOG_LEVEL_DEBUG (4) : debug and informational messages are printed | ||||
to stdout, | ||||
* warnings and errors to stderr | ||||
*/ | ||||
enum usbi_log_level { | ||||
LOG_LEVEL_NONE = 0, | ||||
LOG_LEVEL_ERROR, | ||||
LOG_LEVEL_WARNING, | ||||
LOG_LEVEL_INFO, | ||||
LOG_LEVEL_DEBUG, | ||||
}; | ||||
int LIBUSB_CALL libusb_init(libusb_context **ctx); | int LIBUSB_CALL libusb_init(libusb_context **ctx); | |||
void LIBUSB_CALL libusb_exit(libusb_context *ctx); | void LIBUSB_CALL libusb_exit(libusb_context *ctx); | |||
void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level); | void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level); | |||
const struct libusb_version * LIBUSB_CALL libusb_get_version(void); | const struct libusb_version * LIBUSB_CALL libusb_get_version(void); | |||
int LIBUSB_CALL libusb_has_capability(uint32_t capability); | int LIBUSB_CALL libusb_has_capability(uint32_t capability); | |||
const char * LIBUSB_CALL libusb_error_name(int errcode); | const char * LIBUSB_CALL libusb_error_name(int errcode); | |||
ssize_t LIBUSB_CALL libusb_get_device_list(libusb_context *ctx, | ssize_t LIBUSB_CALL libusb_get_device_list(libusb_context *ctx, | |||
libusb_device ***list); | libusb_device ***list); | |||
void LIBUSB_CALL libusb_free_device_list(libusb_device **list, | void LIBUSB_CALL libusb_free_device_list(libusb_device **list, | |||
skipping to change at line 978 | skipping to change at line 996 | |||
struct libusb_device_descriptor *desc); | struct libusb_device_descriptor *desc); | |||
int LIBUSB_CALL libusb_get_active_config_descriptor(libusb_device *dev, | int LIBUSB_CALL libusb_get_active_config_descriptor(libusb_device *dev, | |||
struct libusb_config_descriptor **config); | struct libusb_config_descriptor **config); | |||
int LIBUSB_CALL libusb_get_config_descriptor(libusb_device *dev, | int LIBUSB_CALL libusb_get_config_descriptor(libusb_device *dev, | |||
uint8_t config_index, struct libusb_config_descriptor **config); | uint8_t config_index, struct libusb_config_descriptor **config); | |||
int LIBUSB_CALL libusb_get_config_descriptor_by_value(libusb_device *dev, | int LIBUSB_CALL libusb_get_config_descriptor_by_value(libusb_device *dev, | |||
uint8_t bConfigurationValue, struct libusb_config_descriptor **confi g); | uint8_t bConfigurationValue, struct libusb_config_descriptor **confi g); | |||
void LIBUSB_CALL libusb_free_config_descriptor( | void LIBUSB_CALL libusb_free_config_descriptor( | |||
struct libusb_config_descriptor *config); | struct libusb_config_descriptor *config); | |||
uint8_t LIBUSB_CALL libusb_get_bus_number(libusb_device *dev); | uint8_t LIBUSB_CALL libusb_get_bus_number(libusb_device *dev); | |||
uint8_t LIBUSB_CALL libusb_get_port_number(libusb_device *dev); | ||||
libusb_device * LIBUSB_CALL libusb_get_parent(libusb_device *dev); | ||||
int LIBUSB_CALL libusb_get_port_path(libusb_context *ctx, libusb_device *de | ||||
v, uint8_t* path, uint8_t path_length); | ||||
uint8_t LIBUSB_CALL libusb_get_device_address(libusb_device *dev); | uint8_t LIBUSB_CALL libusb_get_device_address(libusb_device *dev); | |||
int LIBUSB_CALL libusb_get_device_speed(libusb_device *dev); | int LIBUSB_CALL libusb_get_device_speed(libusb_device *dev); | |||
int LIBUSB_CALL libusb_get_max_packet_size(libusb_device *dev, | int LIBUSB_CALL libusb_get_max_packet_size(libusb_device *dev, | |||
unsigned char endpoint); | unsigned char endpoint); | |||
int LIBUSB_CALL libusb_get_max_iso_packet_size(libusb_device *dev, | int LIBUSB_CALL libusb_get_max_iso_packet_size(libusb_device *dev, | |||
unsigned char endpoint); | unsigned char endpoint); | |||
int LIBUSB_CALL libusb_open(libusb_device *dev, libusb_device_handle **hand le); | int LIBUSB_CALL libusb_open(libusb_device *dev, libusb_device_handle **hand le); | |||
void LIBUSB_CALL libusb_close(libusb_device_handle *dev_handle); | void LIBUSB_CALL libusb_close(libusb_device_handle *dev_handle); | |||
libusb_device * LIBUSB_CALL libusb_get_device(libusb_device_handle *dev_han dle); | libusb_device * LIBUSB_CALL libusb_get_device(libusb_device_handle *dev_han dle); | |||
End of changes. 3 change blocks. | ||||
2 lines changed or deleted | 28 lines changed or added | |||