libusbx-1.0.14
authorPete Batard <pete@akeo.ie>
Mon, 24 Sep 2012 23:35:32 +0000 (00:35 +0100)
committerPete Batard <pete@akeo.ie>
Tue, 25 Sep 2012 22:52:40 +0000 (23:52 +0100)
ChangeLog
NEWS
libusb/libusb.h
libusb/os/windows_usb.c
libusb/version.h
libusb/version_nano.h

index 359365c8d9ba3e1c0b822136d557943f533fe277..c22883bcb022870fe20916fd8b1cc0998c40c4c0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,139 @@
-For the latest change log, please visit:\r
-http://log.libusbx.org\r
-\r
-Alternatively, if you have retrieved the libusbx git repository,\r
-simply navigate to it and issue the command 'git log'.\r
+For detailed information about the changes below, please see the git log or
+visit: http://log.libusbx.org
+
+2012-09-26: v1.0.14
+* Reverts the previous API change with regards to bMaxPower.
+  If this doesn't matter to you, you are encouraged to keep using v1.0.13,
+  as it will use the same attribute as v2.0, to be released soon.
+* Note that LIBUSBX_API_VERSION is *decreased* to 0x010000FF and the previous
+  guidelines with regards to concurent use of MaxPower/bMaxPower still apply.
+
+2012-09-20: v1.0.13
+* [MAJOR] Fix a typo in the API with struct libusb_config_descriptor where
+  MaxPower was used instead of bMaxPower, as defined in the specs. If your 
+  application was accessing the MaxPower attribute, and you need to maintain
+  compatibility with libusb or older versions, see APPENDIX A below.
+* Fix broken support for the 0.1 -> 1.0 libusb-compat layer
+* Fix unwanted cancellation of pending timeouts as well as major timeout related bugs
+* Fix handling of HID and composite devices on Windows
+* Introduce LIBUSBX_API_VERSION macro
+* Add Cypress FX/FX2 firmware upload sample, based on fxload from
+  http://linux-hotplug.sourceforge.net
+* Add libusb0 (libusb-win32) and libusbK driver support on Windows. Note that while
+  the drivers allow it, isochronous transfers are not supported yet in libusbx. Also
+  not supported yet is the use of libusb-win32 filter drivers on composite interfaces
+* Add support for the new get_capabilities ioctl on Linux and avoid unnecessary
+  splitting of bulk transfers
+* Improve support for newer Intel and Renesas USB 3.0 controllers on Windows
+* Harmonize the device number for root hubs across platforms
+* Other bug fixes and improvements
+
+2012-06-15: v1.0.12
+* Fix a potential major regression with pthread on Linux
+* Fix missing thread ID from debug log output on cygwin
+* Fix possible crash when using longjmp and MinGW's gcc 4.6
+* Add topology calls: libusb_get_port_number(), libusb_get_parent() & libusb_get_port_path()
+* Add toggleable debug, using libusb_set_debug() or the LIBUSB_DEBUG environment variable
+* Define log levels in libusb.h and set timestamp origin to first libusb_init() call
+* All logging is now sent to to stderr (info was sent to stdout previously)
+* Update log messages severity and avoid polluting log output on OS-X
+* Add HID driver support on Windows
+* Enable interchangeability of MSVC and MinGW DLLs
+* Additional bug fixes and improvements
+
+2012-05-08: v1.0.11
+* Revert removal of critical Windows event handling that was introduced in 1.0.10
+* Fix a possible deadlock in Windows when submitting transfers
+* Add timestamped logging
+* Add NetBSD support (experimental) and BSD libusb_get_device_speed() data
+* Add bootstrap.sh alongside autogen.sh (bootstrap.sh doesn't invoke configure)
+* Search for device nodes in /dev for Android support
+* Other bug fixes
+
+2012-04-17: v1.0.10
+* Public release
+* Add libusb_get_version
+* Add Visual Studio 2010 project files
+* Some Windows code cleanup
+* Fix xusb sample warnings 
+
+2012-04-02: v1.0.9
+* First libusbx release
+* Add libusb_get_device_speed (all, except BSD) and libusb_error_name
+* Add Windows support (WinUSB driver only)
+* Add OpenBSD support
+* Add xusb sample
+* Tons of bug fixes
+
+2010-05-07: v1.0.8
+* Bug fixes
+
+2010-04-19: v1.0.7
+* Bug fixes and documentation tweaks
+* Add more interface class definitions
+
+2009-11-22: v1.0.6
+* Bug fixes
+* Increase libusb_handle_events() timeout to 60s for powersaving
+
+2009-11-15: v1.0.5
+ * Use timerfd when available for timer management
+ * Small fixes/updates
+
+2009-11-06: v1.0.4 release
+ * Bug fixes including transfer locking to fix some potential threading races
+ * More flexibility with clock types on Linux
+ * Use new bulk continuation tracking in Linux 2.6.32 for improved handling
+   of short/failed transfers
+
+2009-08-27: v1.0.3 release
+ * Bug fixes
+ * Add libusb_get_max_iso_packet_size()
+
+2009-06-13: v1.0.2 release
+ * Bug fixes
+
+2009-05-12: v1.0.1 release
+ * Bug fixes
+ * Darwin backend
+
+2008-12-13: v1.0.0 release
+ * Bug fixes
+
+2008-11-21: v0.9.4 release
+ * Bug fixes
+ * Add libusb_attach_kernel_driver()
+
+2008-08-23: v0.9.3 release
+ * Bug fixes
+
+2008-07-19: v0.9.2 release
+ * Bug fixes
+
+2008-06-28: v0.9.1 release
+ * Bug fixes
+ * Introduce contexts to the API
+ * Compatibility with new Linux kernel features
+
+2008-05-25: v0.9.0 release
+ * First libusb-1.0 beta release
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+APPENDIX A - How to maintain code compatibility with versions of libusb and
+libusbx that use MaxPower:
+
+If you must to maintain compatibility with versions of the library that aren't
+using the bMaxPower attribute in struct libusb_config_descriptor, the 
+recommended way is to use the new LIBUSBX_API_VERSION macro with an #ifdef.
+For instance, if your code was written as follows:
+
+  if (dev->config[0].MaxPower < 250)
+
+Then you should modify it to have:
+
+#if defined(LIBUSBX_API_VERSION) && (LIBUSBX_API_VERSION >= 0x01000100)
+  if (dev->config[0].bMaxPower < 250)
+#else
+  if (dev->config[0].MaxPower < 250)
+#endif
diff --git a/NEWS b/NEWS
index ed25d5f4b5aa75d86c76e0d11d8f116a5e4ceb07..9c04694ce9d3f69d030bf8016489a39beab729c7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,133 +1,2 @@
-This file lists notable changes in each release. 
-For fine grained history, please see the git log at:
-http://log.libusbx.org
-
-2012-09-20: v1.0.13
-* [MAJOR] Fix a typo in the API with struct libusb_config_descriptor where
-  MaxPower was used instead of bMaxPower, as defined in the specs. If your 
-  application was accessing the MaxPower attribute, and you need to maintain
-  compatibility with libusb or older versions, see APPENDIX A below.
-* Fix broken support for the 0.1 -> 1.0 libusb-compat layer
-* Fix unwanted cancellation of pending timeouts as well as major timeout related bugs
-* Fix handling of HID and composite devices on Windows
-* Introduce LIBUSBX_API_VERSION macro
-* Add Cypress FX/FX2 firmware upload sample, based fxload from
-  http://linux-hotplug.sourceforge.net
-* Add libusb0 (libusb-win32) and libusbK driver support on Windows. Note that while
-  the drivers allow it, isochronous transfers are not supported yet in libusbx. Also
-  not supported yet is the use of libusb-win32 filter drivers on composite interfaces
-* Add support for the new get_capabilities ioctl on Linux and avoid unnecessary
-  splitting of bulk transfers
-* Improve support for newer Intel and Renesas USB 3.0 controllers on Windows
-* Harmonize the device number for root hubs accross platforms
-* Other bug fixes and improvements
-
-2012-06-15: v1.0.12
-* Fix a potential major regression with pthread on Linux
-* Fix missing thread ID from debug log output on cygwin
-* Fix possible crash when using longjmp and MinGW's gcc 4.6
-* Add topology calls: libusb_get_port_number(), libusb_get_parent() & libusb_get_port_path()
-* Add toggleable debug, using libusb_set_debug() or the LIBUSB_DEBUG environment variable
-* Define log levels in libusb.h and set timestamp origin to first libusb_init() call
-* All logging is now sent to to stderr (info was sent to stdout previously)
-* Update log messages severity and avoid polluting log output on OS-X
-* Add HID driver support on Windows
-* Enable interchangeability of MSVC and MinGW DLLs
-* Additional bug fixes and improvements
-
-2012-05-08: v1.0.11
-* Revert removal of critical Windows event handling that was introduced in 1.0.10
-* Fix a possible deadlock in Windows when submitting transfers
-* Add timestamped logging
-* Add NetBSD support (experimental) and BSD libusb_get_device_speed() data
-* Add bootstrap.sh alongside autogen.sh (bootstrap.sh doesn't invoke configure)
-* Search for device nodes in /dev for Android support
-* Other bug fixes
-
-2012-04-17: v1.0.10
-* Public release
-* Add libusb_get_version
-* Add Visual Studio 2010 project files
-* Some Windows code cleanup
-* Fix xusb sample warnings 
-
-2012-04-02: v1.0.9
-* First libusbx release
-* Add libusb_get_device_speed (all, except BSD) and libusb_error_name
-* Add Windows support (WinUSB driver only)
-* Add OpenBSD support
-* Add xusb sample
-* Tons of bug fixes
-
-2010-05-07: v1.0.8
-* Bug fixes
-
-2010-04-19: v1.0.7
-* Bug fixes and documentation tweaks
-* Add more interface class definitions
-
-2009-11-22: v1.0.6
-* Bug fixes
-* Increase libusb_handle_events() timeout to 60s for powersaving
-
-2009-11-15: v1.0.5
- * Use timerfd when available for timer management
- * Small fixes/updates
-
-2009-11-06: v1.0.4 release
- * Bug fixes including transfer locking to fix some potential threading races
- * More flexibility with clock types on Linux
- * Use new bulk continuation tracking in Linux 2.6.32 for improved handling
-   of short/failed transfers
-
-2009-08-27: v1.0.3 release
- * Bug fixes
- * Add libusb_get_max_iso_packet_size()
-
-2009-06-13: v1.0.2 release
- * Bug fixes
-
-2009-05-12: v1.0.1 release
- * Bug fixes
- * Darwin backend
-
-2008-12-13: v1.0.0 release
- * Bug fixes
-
-2008-11-21: v0.9.4 release
- * Bug fixes
- * Add libusb_attach_kernel_driver()
-
-2008-08-23: v0.9.3 release
- * Bug fixes
-
-2008-07-19: v0.9.2 release
- * Bug fixes
-
-2008-06-28: v0.9.1 release
- * Bug fixes
- * Introduce contexts to the API
- * Compatibility with new Linux kernel features
-
-2008-05-25: v0.9.0 release
- * First libusb-1.0 beta release
-
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-APPENDIX A - How to maintain code compatibility with versions of libusb and
-libusbx that use MaxPower:
-
-If you must to maintain compatibility with versions of the library that aren't
-using the bMaxPower attribute in struct libusb_config_descriptor, the 
-recommended way is to use the new LIBUSBX_API_VERSION macro with an #ifdef.
-For instance, if your code was written as follows:
-
-  if (dev->config[0].MaxPower < 250)
-
-Then you should modify it to have:
-
-#if defined(LIBUSBX_API_VERSION) && (LIBUSBX_API_VERSION >= 0x01000100)
-  if (dev->config[0].bMaxPower < 250)
-#else
-  if (dev->config[0].MaxPower < 250)
-#endif
+For the latest libusbx news, please refer to the ChangeLog file, or visit:\r
+http://libusbx.org\r
index 7972ef9d4b79d53de142785a1f710d4b9bf0fea2..da94c9bbc3915b9d90c2dc8c311cc2cbd7bb955a 100644 (file)
@@ -130,7 +130,7 @@ typedef unsigned __int32  uint32_t;
  * Internally, LIBUSBX_API_VERSION is defined as follows:
  * (libusbx major << 24) | (libusbx minor << 16) | (16 bit incremental)
  */
-#define LIBUSBX_API_VERSION 0x01000100
+#define LIBUSBX_API_VERSION 0x010000FF
 
 #ifdef __cplusplus
 extern "C" {
@@ -627,7 +627,7 @@ struct libusb_config_descriptor {
        /** Maximum power consumption of the USB device from this bus in this
         * configuration when the device is fully opreation. Expressed in units
         * of 2 mA. */
-       uint8_t  bMaxPower;
+       uint8_t  MaxPower;
 
        /** Array of interfaces supported by this configuration. The length of
         * this array is determined by the bNumInterfaces field. */
index 9fdccdbe41f0240558c2f1a8d572bdfc6564d6c6..fce4d43f43fbad3a492ce629f8b1c1630fa754c3 100644 (file)
@@ -3192,7 +3192,7 @@ static int _hid_get_config_descriptor(struct hid_device_priv* dev, void *data, s
        cd->bConfigurationValue = 1;
        cd->iConfiguration = 0;
        cd->bmAttributes = 1 << 7; /* bus powered */
-       cd->bMaxPower = 50;
+       cd->MaxPower = 50;
 
        id->bLength = LIBUSB_DT_INTERFACE_SIZE;
        id->bDescriptorType = LIBUSB_DT_INTERFACE;
index dbc8acf04197c3e8d869b64f1edab1d372e4896e..1970a01816428efddffb3f8c70d2caa8a70ab821 100644 (file)
@@ -7,7 +7,7 @@
 #define LIBUSB_MINOR 0
 #endif
 #ifndef LIBUSB_MICRO
-#define LIBUSB_MICRO 13
+#define LIBUSB_MICRO 14
 #endif
 #ifndef LIBUSB_NANO
 #define LIBUSB_NANO 0
index 327d56289636d6dc706e9072964359d23b0cbd78..9c8b25912ae591b704b600441e982245261e9585 100644 (file)
@@ -1 +1 @@
-#define LIBUSB_NANO 10575
+#define LIBUSB_NANO 10576