diff options
author | Pete Batard <pete@akeo.ie> | 2012-09-06 00:47:08 +0100 |
---|---|---|
committer | Pete Batard <pete@akeo.ie> | 2012-09-15 02:05:24 +0100 |
commit | 3f513b62467d1842ec0771aaec01fde2f57bfb9c (patch) | |
tree | 229237783975e4cea0d25e72ac747eea72844f7f /libusb/libusb.h | |
parent | 6fbd3dd813827751c9ebe0ea3dfe5e5cef1f2e00 (diff) | |
download | android_external_libusbx-3f513b62467d1842ec0771aaec01fde2f57bfb9c.tar.gz android_external_libusbx-3f513b62467d1842ec0771aaec01fde2f57bfb9c.tar.bz2 android_external_libusbx-3f513b62467d1842ec0771aaec01fde2f57bfb9c.zip |
Core: Update libusb.h header in accordance with the latest USB specs
* IMPORTANT: This update fixes a typo in the API where MaxPower was being
used instead of bMaxPower, with the latter being what is actually in
the specs.
* As a result, applications that were using MaxPower need to be updated
for bMaxPower.
* If you must maintain compatibility with libusb or older versions of
libusbx, you may also want to either use a #define or copy/paste
struct libusb_config_descriptor from libusb.h under a new name, and
then use a cast on calls that require it. For more info, see the
1.0.13 release notes in the NEWS file.
* Also update copyright notice
Diffstat (limited to 'libusb/libusb.h')
-rw-r--r-- | libusb/libusb.h | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/libusb/libusb.h b/libusb/libusb.h index de31a56..ae00c53 100644 --- a/libusb/libusb.h +++ b/libusb/libusb.h @@ -1,7 +1,9 @@ /* * Public libusbx header file - * Copyright © 2007-2008 Daniel Drake <dsd@gentoo.org> * Copyright © 2001 Johannes Erdfelt <johannes@erdfelt.com> + * Copyright © 2007-2008 Daniel Drake <dsd@gentoo.org> + * Copyright © 2012 Pete Batard <pete@akeo.ie> + * For more information, please visit: http://libusbx.org * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -231,6 +233,9 @@ enum libusb_descriptor_type { /** Hub descriptor */ LIBUSB_DT_HUB = 0x29, + + /** SuperSpeed Hub descriptor */ + LIBUSB_DT_SUPERSPEED_HUB = 0x2A, }; /* Descriptor sizes per descriptor type */ @@ -277,7 +282,7 @@ enum libusb_transfer_type { }; /** \ingroup misc - * Standard requests, as defined in table 9-3 of the USB2 specifications */ + * Standard requests, as defined in table 9-5 of the USB 3.0 specifications */ enum libusb_standard_request { /** Request status of the specific recipient */ LIBUSB_REQUEST_GET_STATUS = 0x00, @@ -315,6 +320,13 @@ enum libusb_standard_request { /** Set then report an endpoint's synchronization frame */ LIBUSB_REQUEST_SYNCH_FRAME = 0x0C, + + /** Sets both the U1 and U2 Exit Latency */ + LIBUSB_REQUEST_SET_SEL = 0x30, + + /** Delay from the time a host transmits a packet to the time it is + * received by the device. */ + LIBUSB_SET_ISOCH_DELAY = 0x31, }; /** \ingroup misc @@ -394,7 +406,7 @@ enum libusb_iso_usage_type { /** \ingroup desc * A structure representing the standard USB device descriptor. This - * descriptor is documented in section 9.6.1 of the USB 2.0 specification. + * descriptor is documented in section 9.6.1 of the USB 3.0 specification. * All multiple-byte fields are represented in host-endian format. */ struct libusb_device_descriptor { @@ -448,7 +460,7 @@ struct libusb_device_descriptor { /** \ingroup desc * A structure representing the standard USB endpoint descriptor. This - * descriptor is documented in section 9.6.3 of the USB 2.0 specification. + * descriptor is documented in section 9.6.6 of the USB 3.0 specification. * All multiple-byte fields are represented in host-endian format. */ struct libusb_endpoint_descriptor { @@ -498,7 +510,7 @@ struct libusb_endpoint_descriptor { /** \ingroup desc * A structure representing the standard USB interface descriptor. This - * descriptor is documented in section 9.6.5 of the USB 2.0 specification. + * descriptor is documented in section 9.6.5 of the USB 3.0 specification. * All multiple-byte fields are represented in host-endian format. */ struct libusb_interface_descriptor { @@ -560,7 +572,7 @@ struct libusb_interface { /** \ingroup desc * A structure representing the standard USB configuration descriptor. This - * descriptor is documented in section 9.6.3 of the USB 2.0 specification. + * descriptor is documented in section 9.6.3 of the USB 3.0 specification. * All multiple-byte fields are represented in host-endian format. */ struct libusb_config_descriptor { @@ -590,7 +602,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 MaxPower; + uint8_t bMaxPower; /** Array of interfaces supported by this configuration. The length of * this array is determined by the bNumInterfaces field. */ |