diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-05-15 07:38:35 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-05-15 07:38:35 +0000 |
commit | fabfdd454a11440a5789a70f6476889b02928438 (patch) | |
tree | 350db859d2c94fc39946d5bd421b71b9a9646065 /Demos/Host | |
parent | 32f0f605efa293430a47d60bb857695ff6937d21 (diff) | |
download | lufa-fabfdd454a11440a5789a70f6476889b02928438.tar.gz lufa-fabfdd454a11440a5789a70f6476889b02928438.tar.bz2 lufa-fabfdd454a11440a5789a70f6476889b02928438.zip |
Fixed CDCHost not clearing configured endpoints and resetting configured endpoints mask when a partially enumerated invalid CDC interface is skipped.
Diffstat (limited to 'Demos/Host')
-rw-r--r-- | Demos/Host/CDCHost/ConfigDescriptor.c | 8 |
1 files changed, 8 insertions, 0 deletions
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))
{
|