From fabfdd454a11440a5789a70f6476889b02928438 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Fri, 15 May 2009 07:38:35 +0000 Subject: Fixed CDCHost not clearing configured endpoints and resetting configured endpoints mask when a partially enumerated invalid CDC interface is skipped. --- Demos/Host/CDCHost/ConfigDescriptor.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Demos/Host/CDCHost/ConfigDescriptor.c') 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)) { -- cgit v1.2.3