summaryrefslogtreecommitdiff
path: root/libusb/libusb.h
diff options
context:
space:
mode:
authorPete Batard <pete@akeo.ie>2012-04-10 11:58:53 +0100
committerPete Batard <pete@akeo.ie>2012-04-10 12:46:10 +0100
commit37dfd16c8c2f36c81c86de303072def0dc405e32 (patch)
tree4a277ac5a82e5cf8090eeece3070b2501d696615 /libusb/libusb.h
parent5b82831df2aca7508c131b7fa7964770b689a67b (diff)
downloadlibusb-37dfd16c8c2f36c81c86de303072def0dc405e32.tar.gz
Core: Add get_version() call
* Also some formatting/typo improvements
Diffstat (limited to 'libusb/libusb.h')
-rw-r--r--libusb/libusb.h31
1 files changed, 21 insertions, 10 deletions
diff --git a/libusb/libusb.h b/libusb/libusb.h
index 12a5f8f..da4683c 100644
--- a/libusb/libusb.h
+++ b/libusb/libusb.h
@@ -639,6 +639,16 @@ struct libusb_device;
struct libusb_device_handle;
/** \ingroup lib
+ * Structure providing the version of libusbx currently in use
+ */
+struct libusb_version {
+ uint16_t major;
+ uint16_t minor;
+ uint16_t micro;
+ uint16_t nano;
+};
+
+/** \ingroup lib
* Structure representing a libusbx session. The concept of individual libusbx
* sessions allows for your program to use two libraries (or dynamically
* load two modules) which both independently use libusb. This will prevent
@@ -689,20 +699,20 @@ typedef struct libusb_device_handle libusb_device_handle;
* Speed codes. Indicates the speed at which the device is operating.
*/
enum libusb_speed {
- /** The OS doesn't report or know the device speed. */
- LIBUSB_SPEED_UNKNOWN = 0,
+ /** The OS doesn't report or know the device speed. */
+ LIBUSB_SPEED_UNKNOWN = 0,
- /** The device is operating at low speed (1.5MBit/s). */
- LIBUSB_SPEED_LOW = 1,
+ /** The device is operating at low speed (1.5MBit/s). */
+ LIBUSB_SPEED_LOW = 1,
- /** The device is operating at full speed (12MBit/s). */
- LIBUSB_SPEED_FULL = 2,
+ /** The device is operating at full speed (12MBit/s). */
+ LIBUSB_SPEED_FULL = 2,
- /** The device is operating at high speed (480MBit/s). */
- LIBUSB_SPEED_HIGH = 3,
+ /** The device is operating at high speed (480MBit/s). */
+ LIBUSB_SPEED_HIGH = 3,
- /** The device is operating at super speed (5000MBit/s). */
- LIBUSB_SPEED_SUPER = 4,
+ /** The device is operating at super speed (5000MBit/s). */
+ LIBUSB_SPEED_SUPER = 4,
};
/** \ingroup misc
@@ -929,6 +939,7 @@ enum libusb_capability {
int LIBUSB_CALL libusb_init(libusb_context **ctx);
void LIBUSB_CALL libusb_exit(libusb_context *ctx);
void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level);
+const struct libusb_version * LIBUSB_CALL libusb_get_version(void);
int LIBUSB_CALL libusb_has_capability(uint32_t capability);
const char * LIBUSB_CALL libusb_error_name(int errcode);