aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.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 /Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.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 'Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c')
-rw-r--r--Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c b/Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c
index 4ee3b998f..d48026d74 100644
--- a/Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c
+++ b/Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c
@@ -51,7 +51,7 @@ uint8_t ProcessConfigurationDescriptor(void)
uint16_t ConfigDescriptorSize;
/* Get Configuration Descriptor size from the device */
- if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
+ if (USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
return ControlError;
/* Ensure that the Configuration Descriptor isn't too large */
@@ -62,7 +62,7 @@ uint8_t ProcessConfigurationDescriptor(void)
ConfigDescriptorData = alloca(ConfigDescriptorSize);
/* Retrieve the entire configuration descriptor into the allocated buffer */
- USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData);
+ USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData);
/* Validate returned data - ensure first entry is a configuration header descriptor */
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)