aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-06-19 03:37:47 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-06-19 03:37:47 +0000
commitdfa547164a1f9aefe202041e61075852f6e47191 (patch)
treebf01445acc8cbf41c614ef5a928802fd0ec9eeda /LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
parent0d8679cf6bf02b3fd07028f63187286f5d4ffc20 (diff)
downloadlufa-dfa547164a1f9aefe202041e61075852f6e47191.tar.gz
lufa-dfa547164a1f9aefe202041e61075852f6e47191.tar.bz2
lufa-dfa547164a1f9aefe202041e61075852f6e47191.zip
Extend USB_GetDeviceConfigDescriptor() routine to require the configuration number within the device to fetch, to add support for multi-configuration devices.
Diffstat (limited to 'LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h')
-rw-r--r--LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
index 5c2b6e2de..17b6378e9 100644
--- a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
+++ b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
@@ -183,6 +183,9 @@
/* Function Prototypes: */
/** Retrieves the configuration descriptor data or size from an attached device via a standard request.
*
+ * \param ConfigNumber Device configuration descriptor number to fetch from the device (usually set to 1 for
+ * single configuration devices)
+ *
* \param ConfigSizePtr Pointer to a uint16_t for either storing or retrieving the configuration
* descriptor size
*
@@ -192,8 +195,8 @@
* of bytes indicated by ConfigSizePtr of the configuration descriptor will be loaded
* into the buffer
*/
- uint8_t USB_GetDeviceConfigDescriptor(uint16_t* const ConfigSizePtr, void* BufferPtr)
- ATTR_NON_NULL_PTR_ARG(1);
+ uint8_t USB_GetDeviceConfigDescriptor(uint8_t ConfigNumber, uint16_t* const ConfigSizePtr, void* BufferPtr)
+ ATTR_NON_NULL_PTR_ARG(2);
/** Skips to the next sub-descriptor inside the configuration descriptor of the specified type value.
* The bytes remaining value is automatically decremented.