- \r
- /* Get Configuration Descriptor size from the device */\r
- if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)\r
- return ControlError;\r
- \r
- /* Ensure that the Configuration Descriptor isn't too large */\r
- if (ConfigDescriptorSize > MAX_CONFIG_DESCRIPTOR_SIZE)\r
- return DescriptorTooLarge;\r
- \r
- /* Allocate enough memory for the entire config descriptor */\r
- ConfigDescriptorData = alloca(ConfigDescriptorSize);\r