aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host/KeyboardHost
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-05-15 08:02:30 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-05-15 08:02:30 +0000
commit76d5e99bb8765030a7f99e7b5adf9bae7f92e0ba (patch)
tree3d21b280a0648adcf2f3d66b9e3fa5c0c00c7f6e /Demos/Host/KeyboardHost
parentfabfdd454a11440a5789a70f6476889b02928438 (diff)
downloadlufa-76d5e99bb8765030a7f99e7b5adf9bae7f92e0ba.tar.gz
lufa-76d5e99bb8765030a7f99e7b5adf9bae7f92e0ba.tar.bz2
lufa-76d5e99bb8765030a7f99e7b5adf9bae7f92e0ba.zip
Fix to previous patch (make CDCHost demo deallocate pipes when an invalid CDC interface is skipped).
Remove the saving of the USB_GetNextDescriptorComp() return value in all host demos, since it went unused anyway; replaced with a simple check against the success error code for clarity.
Diffstat (limited to 'Demos/Host/KeyboardHost')
-rw-r--r--Demos/Host/KeyboardHost/ConfigDescriptor.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Demos/Host/KeyboardHost/ConfigDescriptor.c b/Demos/Host/KeyboardHost/ConfigDescriptor.c
index 303f06dc1..b0233d98c 100644
--- a/Demos/Host/KeyboardHost/ConfigDescriptor.c
+++ b/Demos/Host/KeyboardHost/ConfigDescriptor.c
@@ -69,7 +69,8 @@ uint8_t ProcessConfigurationDescriptor(void)
return InvalidConfigDataReturned;
/* Get the keyboard interface from the configuration descriptor */
- if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, NextKeyboardInterface))
+ if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
+ NextKeyboardInterface) != DESCRIPTOR_SEARCH_COMP_Found)
{
/* Descriptor not found, error out */
return NoHIDInterfaceFound;
@@ -77,7 +78,7 @@ uint8_t ProcessConfigurationDescriptor(void)
/* Get the keyboard interface's data endpoint descriptor */
if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
- NextInterfaceKeyboardDataEndpoint))
+ NextInterfaceKeyboardDataEndpoint) != DESCRIPTOR_SEARCH_COMP_Found)
{
/* Descriptor not found, error out */
return NoEndpointFound;