Synchronise with the 090605 release.
[pub/USBasp.git] / Demos / Host / MouseHost / ConfigDescriptor.c
index f29eda1..0f6ab59 100644 (file)
@@ -69,7 +69,8 @@ uint8_t ProcessConfigurationDescriptor(void)
          return InvalidConfigDataReturned;\r
        \r
        /* Get the mouse interface from the configuration descriptor */\r
-       if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, NextMouseInterface))\r
+       if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,\r
+                                     DComp_NextMouseInterface) != DESCRIPTOR_SEARCH_COMP_Found)\r
        {\r
                /* Descriptor not found, error out */\r
                return NoHIDInterfaceFound;\r
@@ -77,7 +78,7 @@ uint8_t ProcessConfigurationDescriptor(void)
 \r
        /* Get the mouse interface's data endpoint descriptor */\r
        if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,\r
-                                     NextInterfaceMouseDataEndpoint))\r
+                                     DComp_NextInterfaceMouseDataEndpoint) != DESCRIPTOR_SEARCH_COMP_Found)\r
        {\r
                /* Descriptor not found, error out */\r
                return NoEndpointFound;\r
@@ -104,7 +105,7 @@ uint8_t ProcessConfigurationDescriptor(void)
  *\r
  *  \return A value from the DSEARCH_Return_ErrorCodes_t enum\r
  */\r
-DESCRIPTOR_COMPARATOR(NextMouseInterface)\r
+uint8_t DComp_NextMouseInterface(void* CurrentDescriptor)\r
 {\r
        /* Determine if the current descriptor is an interface descriptor */\r
        if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)\r
@@ -131,7 +132,7 @@ DESCRIPTOR_COMPARATOR(NextMouseInterface)
  *\r
  *  \return A value from the DSEARCH_Return_ErrorCodes_t enum\r
  */\r
-DESCRIPTOR_COMPARATOR(NextInterfaceMouseDataEndpoint)\r
+uint8_t DComp_NextInterfaceMouseDataEndpoint(void* CurrentDescriptor)\r
 {\r
        /* Determine the type of the current descriptor */\r
        if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Endpoint)\r