aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/Class/Host/CDC.c
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/Class/Host/CDC.c
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/Class/Host/CDC.c')
-rw-r--r--LUFA/Drivers/USB/Class/Host/CDC.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/LUFA/Drivers/USB/Class/Host/CDC.c b/LUFA/Drivers/USB/Class/Host/CDC.c
index 3a572f18f..aef5b3539 100644
--- a/LUFA/Drivers/USB/Class/Host/CDC.c
+++ b/LUFA/Drivers/USB/Class/Host/CDC.c
@@ -40,7 +40,7 @@ static uint8_t CDC_Host_ProcessConfigDescriptor(USB_ClassInfo_CDC_Host_t* CDCInt
uint16_t ConfigDescriptorSize;
uint8_t FoundEndpoints = 0;
- if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
+ if (USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
return CDC_ENUMERROR_ControlError;
if (ConfigDescriptorSize > 512)
@@ -48,7 +48,7 @@ static uint8_t CDC_Host_ProcessConfigDescriptor(USB_ClassInfo_CDC_Host_t* CDCInt
ConfigDescriptorData = alloca(ConfigDescriptorSize);
- USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData);
+ USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData);
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
return CDC_ENUMERROR_InvalidConfigDataReturned;