Removed "Host_" section of the function names in ConfigDescriptor.h, as most of the...
[pub/USBasp.git] / LUFA / Drivers / USB / Class / ConfigDescriptor.c
index ecd5879..61a5c44 100644 (file)
   this software.\r
 */\r
 \r
-#include "../HighLevel/USBMode.h"\r
-\r
-#if defined(USB_CAN_BE_HOST)\r
-\r
 #include "ConfigDescriptor.h"\r
 \r
-uint8_t USB_Host_GetDeviceConfigDescriptor(uint16_t* const ConfigSizePtr, void* BufferPtr)\r
+#if defined(USB_CAN_BE_HOST)\r
+uint8_t USB_GetDeviceConfigDescriptor(uint16_t* const ConfigSizePtr, void* BufferPtr)\r
 {\r
        uint8_t ErrorCode;\r
 \r
@@ -70,28 +67,29 @@ uint8_t USB_Host_GetDeviceConfigDescriptor(uint16_t* const ConfigSizePtr, void*
 \r
        return ErrorCode;\r
 }\r
+#endif\r
 \r
-void USB_Host_GetNextDescriptorOfType(uint16_t* const BytesRem,\r
-                                      uint8_t** const CurrConfigLoc,\r
-                                      const uint8_t Type)\r
+void USB_GetNextDescriptorOfType(uint16_t* const BytesRem,\r
+                                 uint8_t** const CurrConfigLoc,\r
+                                 const uint8_t Type)\r
 {\r
        while (*BytesRem)\r
        {\r
-               USB_Host_GetNextDescriptor(BytesRem, CurrConfigLoc);      \r
+               USB_GetNextDescriptor(BytesRem, CurrConfigLoc);   \r
 \r
                if (DESCRIPTOR_TYPE(*CurrConfigLoc) == Type)\r
                  return;\r
        }\r
 }\r
 \r
-void USB_Host_GetNextDescriptorOfTypeBefore(uint16_t* const BytesRem,\r
-                                            uint8_t** const CurrConfigLoc,\r
-                                            const uint8_t Type,\r
-                                            const uint8_t BeforeType)\r
+void USB_GetNextDescriptorOfTypeBefore(uint16_t* const BytesRem,\r
+                                       uint8_t** const CurrConfigLoc,\r
+                                       const uint8_t Type,\r
+                                       const uint8_t BeforeType)\r
 {\r
        while (*BytesRem)\r
        {\r
-               USB_Host_GetNextDescriptor(BytesRem, CurrConfigLoc);\r
+               USB_GetNextDescriptor(BytesRem, CurrConfigLoc);\r
 \r
                if (DESCRIPTOR_TYPE(*CurrConfigLoc) == Type)\r
                {\r
@@ -105,19 +103,18 @@ void USB_Host_GetNextDescriptorOfTypeBefore(uint16_t* const BytesRem,
        }\r
 }\r
 \r
-void USB_Host_GetNextDescriptorOfTypeAfter(uint16_t* const BytesRem,\r
-                                           uint8_t** const CurrConfigLoc,\r
-                                           const uint8_t Type,\r
-                                           const uint8_t AfterType)\r
+void USB_GetNextDescriptorOfTypeAfter(uint16_t* const BytesRem,\r
+                                      uint8_t** const CurrConfigLoc,\r
+                                      const uint8_t Type,\r
+                                      const uint8_t AfterType)\r
 {\r
-       USB_Host_GetNextDescriptorOfType(BytesRem, CurrConfigLoc, AfterType);\r
+       USB_GetNextDescriptorOfType(BytesRem, CurrConfigLoc, AfterType);\r
        \r
        if (*BytesRem)\r
-         USB_Host_GetNextDescriptorOfType(BytesRem, CurrConfigLoc, Type);\r
+         USB_GetNextDescriptorOfType(BytesRem, CurrConfigLoc, Type);\r
 }\r
                        \r
-uint8_t USB_Host_GetNextDescriptorComp_P(uint16_t* BytesRem, uint8_t** CurrConfigLoc,\r
-                                         uint8_t (* const ComparatorRoutine)(void*))\r
+uint8_t USB_GetNextDescriptorComp_P(uint16_t* BytesRem, uint8_t** CurrConfigLoc, ComparatorPtr_t ComparatorRoutine)\r
 {\r
        uint8_t ErrorCode;\r
                \r
@@ -126,7 +123,7 @@ uint8_t USB_Host_GetNextDescriptorComp_P(uint16_t* BytesRem, uint8_t** CurrConfi
                uint8_t*  PrevDescLoc = *CurrConfigLoc;\r
                uint16_t  PrevBytesRem = *BytesRem;\r
 \r
-               USB_Host_GetNextDescriptor(BytesRem, CurrConfigLoc);\r
+               USB_GetNextDescriptor(BytesRem, CurrConfigLoc);\r
 \r
                if ((ErrorCode = ComparatorRoutine(*CurrConfigLoc)) != Descriptor_Search_NotFound)\r
                {\r
@@ -142,5 +139,3 @@ uint8_t USB_Host_GetNextDescriptorComp_P(uint16_t* BytesRem, uint8_t** CurrConfi
        \r
        return Descriptor_Search_Comp_EndOfDescriptor;\r
 }\r
-\r
-#endif\r