summaryrefslogtreecommitdiff
path: root/at91lib/usb/device/core/USBDDriverDescriptors.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-07-31 18:09:42 +0200
committerHarald Welte <laforge@gnumonks.org>2011-07-31 18:09:42 +0200
commit30a5b024c3485ba4de1271ffc3eedbf14c55bf71 (patch)
tree00838f53187bc86dc29a87142e89d90add0c2527 /at91lib/usb/device/core/USBDDriverDescriptors.h
parentcfe1806207a60775f699a78ec9d8c0cf4a709b56 (diff)
USBD: Add support for up to 4 configurations per device
This is implemented by using a pointer array for the config descriptors
Diffstat (limited to 'at91lib/usb/device/core/USBDDriverDescriptors.h')
-rw-r--r--at91lib/usb/device/core/USBDDriverDescriptors.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/at91lib/usb/device/core/USBDDriverDescriptors.h b/at91lib/usb/device/core/USBDDriverDescriptors.h
index f1064e4..29e5eb7 100644
--- a/at91lib/usb/device/core/USBDDriverDescriptors.h
+++ b/at91lib/usb/device/core/USBDDriverDescriptors.h
@@ -47,6 +47,8 @@
#include <usb/common/core/USBConfigurationDescriptor.h>
#include <usb/common/core/USBDeviceQualifierDescriptor.h>
+#define USBD_NUM_CONFIGS 4
+
//------------------------------------------------------------------------------
// Types
//------------------------------------------------------------------------------
@@ -62,19 +64,19 @@ typedef struct {
/// Pointer to the full-speed device descriptor.
const USBDeviceDescriptor *pFsDevice;
/// Pointer to the full-speed configuration descriptor.
- const USBConfigurationDescriptor *pFsConfiguration;
+ const USBConfigurationDescriptor *pFsConfiguration[USBD_NUM_CONFIGS];
/// Pointer to the full-speed qualifier descriptor.
const USBDeviceQualifierDescriptor *pFsQualifier;
/// Pointer to the full-speed other speed configuration descriptor.
- const USBConfigurationDescriptor *pFsOtherSpeed;
+ const USBConfigurationDescriptor *pFsOtherSpeed[USBD_NUM_CONFIGS];
/// Pointer to the high-speed device descriptor.
const USBDeviceDescriptor *pHsDevice;
/// Pointer to the high-speed configuration descriptor.
- const USBConfigurationDescriptor *pHsConfiguration;
+ const USBConfigurationDescriptor *pHsConfiguration[USBD_NUM_CONFIGS];
/// Pointer to the high-speed qualifier descriptor.
const USBDeviceQualifierDescriptor *pHsQualifier;
/// Pointer to the high-speed other speed configuration descriptor.
- const USBConfigurationDescriptor *pHsOtherSpeed;
+ const USBConfigurationDescriptor *pHsOtherSpeed[USBD_NUM_CONFIGS];
/// Pointer to the list of string descriptors.
const unsigned char **pStrings;
/// Number of string descriptors in list.
personal git repositories of Harald Welte. Your mileage may vary