X-Git-Url: http://git.linex4red.de/pub/lufa.git/blobdiff_plain/32f0f605efa293430a47d60bb857695ff6937d21..fabfdd454a11440a5789a70f6476889b02928438:/Demos/Host/CDCHost/ConfigDescriptor.c?ds=sidebyside diff --git a/Demos/Host/CDCHost/ConfigDescriptor.c b/Demos/Host/CDCHost/ConfigDescriptor.c index 9a23fc3fa..29afbfaa1 100644 --- a/Demos/Host/CDCHost/ConfigDescriptor.c +++ b/Demos/Host/CDCHost/ConfigDescriptor.c @@ -95,6 +95,14 @@ uint8_t ProcessConfigurationDescriptor(void) } else { + /* Clear the found endpoints mask, since any already processed endpoints aren't in the CDC interface we need */ + FoundEndpoints = 0; + + /* Disable any already configured endpoints from the invalid CDC interfaces */ + Endpoint_DisableEndpoint(CDC_NOTIFICATIONPIPE); + Endpoint_DisableEndpoint(CDC_DATAPIPE_IN); + Endpoint_DisableEndpoint(CDC_DATAPIPE_OUT); + /* Get the next CDC control interface from the configuration descriptor (CDC class has two CDC interfaces) */ if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, NextCDCControlInterface)) {