This is #26: https://github.com/libusbx/libusbx/issues/26, but doesn't
include BOS/EP Companion.
Note that the proposed patch fixes libusb_config_descriptor to use
bMaxPower, as it is labelled in the specs, rather than MaxPower => this
can break the compilation of existing applications.
Now, the way I see it is:
- Not many people use are likely to use the MaxPower attribute in their apps
- We're not breaking linking to the library
- The few people who use MaxPower should easily be able to figure out
why they get a compilation error and fix it
=> I'd like to push for this change as I see it low impact, despite
affecting the API. But I'm ready to hear good arguments against the
MaxPower -> bMaxPower change.
I also took the opportunity to update the copyright in our most public
header, as we might as well promote libusbx there.
Regards,
/Pete
>From 81684b7eb4b7225a1066e2ace99e4bfc78afac73 Mon Sep 17 00:00:00 2001
From: Pete Batard <p...@akeo.ie>
Date: Thu, 6 Sep 2012 00:47:08 +0100
Subject: [PATCH] Core: Update libusb.h header in accordance with USB 3.0
specs
* Also update copyright notice
---
libusb/libusb.h | 25 ++++++++++++++++++-------
1 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/libusb/libusb.h b/libusb/libusb.h
index de31a56..c41ea22 100644
--- a/libusb/libusb.h
+++ b/libusb/libusb.h
@@ -1,7 +1,8 @@
/*
* Public libusbx header file
- * Copyright © 2007-2008 Daniel Drake <d...@gentoo.org>
* Copyright © 2001 Johannes Erdfelt <johan...@erdfelt.com>
+ * Copyright © 2007-2008 Daniel Drake <d...@gentoo.org>
+ * Copyright © 2012 libusbx.org <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 +232,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 +281,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 +319,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 +405,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 +459,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 +509,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 +571,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 +601,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. */
--
1.7.11.msysgit.0
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel