- /* Descriptor not found, error out */\r
- return NoCDCInterfaceFound;\r
+ /* Get the next CDC data interface from the configuration descriptor (CDC class has two CDC interfaces) */\r
+ if (USB_Host_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, NextCDCDataInterface))\r
+ {\r
+ /* Descriptor not found, error out */\r
+ return NoCDCInterfaceFound;\r
+ }\r
+ }\r
+ else\r
+ {\r
+ /* Get the next CDC control interface from the configuration descriptor (CDC class has two CDC interfaces) */\r
+ if (USB_Host_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, NextCDCControlInterface))\r
+ {\r
+ /* Descriptor not found, error out */\r
+ return NoCDCInterfaceFound;\r
+ }\r