Endpoint configuration is now refined to give better output when all configurations...
[pub/USBasp.git] / LUFA / Drivers / USB / Class / ConfigDescriptor.c
index 61a5c44..7883830 100644 (file)
@@ -35,13 +35,13 @@ uint8_t USB_GetDeviceConfigDescriptor(uint16_t* const ConfigSizePtr, void* Buffe
 {\r
        uint8_t ErrorCode;\r
 \r
-       USB_HostRequest = (USB_Host_Request_Header_t)\r
+       USB_ControlRequest = (USB_Request_Header_t)\r
                {\r
-                       bmRequestType: (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE),\r
-                       bRequest:      REQ_GetDescriptor,\r
-                       wValue:        (DTYPE_Configuration << 8),\r
-                       wIndex:        0,\r
-                       wLength:       sizeof(USB_Descriptor_Configuration_Header_t),\r
+                       .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE),\r
+                       .bRequest      = REQ_GetDescriptor,\r
+                       .wValue        = (DTYPE_Configuration << 8),\r
+                       .wIndex        = 0,\r
+                       .wLength       = sizeof(USB_Descriptor_Configuration_Header_t),\r
                };\r
        \r
        Pipe_SelectPipe(PIPE_CONTROLPIPE);\r
@@ -60,7 +60,7 @@ uint8_t USB_GetDeviceConfigDescriptor(uint16_t* const ConfigSizePtr, void* Buffe
        }\r
        else\r
        {\r
-               USB_HostRequest.wLength = *ConfigSizePtr;\r
+               USB_ControlRequest.wLength = *ConfigSizePtr;\r
                \r
                ErrorCode      = USB_Host_SendControlRequest(BufferPtr);                                \r
        }\r
@@ -114,7 +114,7 @@ void USB_GetNextDescriptorOfTypeAfter(uint16_t* const BytesRem,
          USB_GetNextDescriptorOfType(BytesRem, CurrConfigLoc, Type);\r
 }\r
                        \r
-uint8_t USB_GetNextDescriptorComp_P(uint16_t* BytesRem, uint8_t** CurrConfigLoc, ComparatorPtr_t ComparatorRoutine)\r
+uint8_t USB_GetNextDescriptorComp_Prv(uint16_t* BytesRem, uint8_t** CurrConfigLoc, ComparatorPtr_t ComparatorRoutine)\r
 {\r
        uint8_t ErrorCode;\r
                \r
@@ -125,9 +125,9 @@ uint8_t USB_GetNextDescriptorComp_P(uint16_t* BytesRem, uint8_t** CurrConfigLoc,
 \r
                USB_GetNextDescriptor(BytesRem, CurrConfigLoc);\r
 \r
-               if ((ErrorCode = ComparatorRoutine(*CurrConfigLoc)) != Descriptor_Search_NotFound)\r
+               if ((ErrorCode = ComparatorRoutine(*CurrConfigLoc)) != DESCRIPTOR_SEARCH_NotFound)\r
                {\r
-                       if (ErrorCode == Descriptor_Search_Fail)\r
+                       if (ErrorCode == DESCRIPTOR_SEARCH_Fail)\r
                        {\r
                                *CurrConfigLoc = PrevDescLoc;\r
                                *BytesRem      = PrevBytesRem;\r
@@ -137,5 +137,5 @@ uint8_t USB_GetNextDescriptorComp_P(uint16_t* BytesRem, uint8_t** CurrConfigLoc,
                }\r
        }\r
        \r
-       return Descriptor_Search_Comp_EndOfDescriptor;\r
+       return DESCRIPTOR_SEARCH_COMP_EndOfDescriptor;\r
 }\r