diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-04-19 11:43:21 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-04-19 11:43:21 +0000 |
commit | 663f449c10b9a77a429aaa81066ce2b43ca6dc39 (patch) | |
tree | 3a6f06560fa24589836aaf9d2aa8747383913aae /Demos/Host/MouseHost/ConfigDescriptor.c | |
parent | 32e735b2b2eefb74e0415a5826692f7ba8c0a984 (diff) | |
download | lufa-663f449c10b9a77a429aaa81066ce2b43ca6dc39.tar.gz lufa-663f449c10b9a77a429aaa81066ce2b43ca6dc39.tar.bz2 lufa-663f449c10b9a77a429aaa81066ce2b43ca6dc39.zip |
Fixed incorrect HID interface class and subclass values in the Mouse and KeyboardMouse demos (thanks to Brian Dickman).
Capitolised the "Descriptor_Search" and "Descriptor_Search_Comp" prefixes of the values in the DSearch_Return_ErrorCodes_t and DSearch_Comp_Return_ErrorCodes_t enums.
Minor documentation improvements.
Diffstat (limited to 'Demos/Host/MouseHost/ConfigDescriptor.c')
-rw-r--r-- | Demos/Host/MouseHost/ConfigDescriptor.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Demos/Host/MouseHost/ConfigDescriptor.c b/Demos/Host/MouseHost/ConfigDescriptor.c index 2c842ac99..ef53e7c42 100644 --- a/Demos/Host/MouseHost/ConfigDescriptor.c +++ b/Demos/Host/MouseHost/ConfigDescriptor.c @@ -69,15 +69,15 @@ uint8_t ProcessConfigurationDescriptor(void) return InvalidConfigDataReturned;
/* Get the mouse interface from the configuration descriptor */
- if (USB_Host_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, NextMouseInterface))
+ if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, NextMouseInterface))
{
/* Descriptor not found, error out */
return NoHIDInterfaceFound;
}
/* Get the mouse interface's data endpoint descriptor */
- if (USB_Host_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
- NextInterfaceMouseDataEndpoint))
+ if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
+ NextInterfaceMouseDataEndpoint))
{
/* Descriptor not found, error out */
return NoEndpointFound;
@@ -121,12 +121,12 @@ DESCRIPTOR_COMPARATOR(NextMouseInterface) (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == MOUSE_PROTOCOL))
{
/* Indicate that the descriptor being searched for has been found */
- return Descriptor_Search_Found;
+ return DESCRIPTOR_SEARCH_Found;
}
}
/* Current descriptor does not match what this comparator is looking for */
- return Descriptor_Search_NotFound;
+ return DESCRIPTOR_SEARCH_NotFound;
}
/** Descriptor comparator function. This comparator function is can be called while processing an attached USB device's
@@ -147,15 +147,15 @@ DESCRIPTOR_COMPARATOR(NextInterfaceMouseDataEndpoint) if (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Endpoint_t).EndpointAddress & ENDPOINT_DESCRIPTOR_DIR_IN)
{
/* Indicate that the descriptor being searched for has been found */
- return Descriptor_Search_Found;
+ return DESCRIPTOR_SEARCH_Found;
}
}
else if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
{
/* Indicate that the search has failed prematurely and should be aborted */
- return Descriptor_Search_Fail;
+ return DESCRIPTOR_SEARCH_Fail;
}
/* Current descriptor does not match what this comparator is looking for */
- return Descriptor_Search_NotFound;
+ return DESCRIPTOR_SEARCH_NotFound;
}
|