Fixed CDCHost not clearing configured endpoints and resetting configured endpoints mask when a partially enumerated invalid CDC interface is skipped.

This commit is contained in:
Dean Camera 2009-05-15 07:38:35 +00:00
parent 32f0f605ef
commit fabfdd454a
3 changed files with 14 additions and 4 deletions

View file

@ -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))
{