From dfa547164a1f9aefe202041e61075852f6e47191 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Fri, 19 Jun 2009 03:37:47 +0000 Subject: Extend USB_GetDeviceConfigDescriptor() routine to require the configuration number within the device to fetch, to add support for multi-configuration devices. --- Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Demos/Host/LowLevel/CDCHost') diff --git a/Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c b/Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c index baf02a216..57d7ec051 100644 --- a/Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c +++ b/Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c @@ -52,7 +52,7 @@ uint8_t ProcessConfigurationDescriptor(void) uint8_t FoundEndpoints = 0; /* 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 */ @@ -63,7 +63,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) -- cgit v1.2.3