EVENT_HANDLER(USB_ConfigurationChanged)\r
{\r
/* Setup CDC Notification, Rx and Tx Endpoints */\r
- Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT,\r
- ENDPOINT_DIR_IN, CDC_NOTIFICATION_EPSIZE,\r
- ENDPOINT_BANK_SINGLE);\r
-\r
Endpoint_ConfigureEndpoint(CDC_TX_EPNUM, EP_TYPE_BULK,\r
ENDPOINT_DIR_IN, CDC_TXRX_EPSIZE,\r
ENDPOINT_BANK_SINGLE);\r
ENDPOINT_DIR_OUT, CDC_TXRX_EPSIZE,\r
ENDPOINT_BANK_SINGLE);\r
\r
+ Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT,\r
+ ENDPOINT_DIR_IN, CDC_NOTIFICATION_EPSIZE,\r
+ ENDPOINT_BANK_SINGLE);\r
+\r
/* Indicate USB connected and ready */\r
UpdateStatus(Status_USBReady);\r
\r
}\r
else\r
{\r
+ /* Clear the found endpoints mask, since any already processed endpoints aren't in the CDC interface we need */\r
+ FoundEndpoints = 0;\r
+\r
+ /* Disable any already configured endpoints from the invalid CDC interfaces */\r
+ Endpoint_DisableEndpoint(CDC_NOTIFICATIONPIPE);\r
+ Endpoint_DisableEndpoint(CDC_DATAPIPE_IN);\r
+ Endpoint_DisableEndpoint(CDC_DATAPIPE_OUT);\r
+ \r
/* Get the next CDC control interface from the configuration descriptor (CDC class has two CDC interfaces) */\r
if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, NextCDCControlInterface))\r
{\r
* - Removed support for endpoint/pipe non-control interrupts; these did not act in the way users expected, and had many subtle issues\r
* - Fixed Device Mode not handling Set Feature and Clear Feature Chapter 9 requests that are addressed to the device (thanks to Brian Dickman)\r
* - Moved control endpoint interrupt handling into the library itself, enable via the new INTERRUPT_CONTROL_ENDPOINT token\r
+ * - Fixed CDCHost not clearing configured endpoints and resetting configured endpoints mask when a partially enumerated invalid CDC\r
+ * interface is skipped\r
*\r
*\r
* \section Sec_ChangeLog090510 Version 090510\r