Minor documentation enhancements.
[pub/USBasp.git] / LUFA / Drivers / USB / HighLevel / ConfigDescriptor.c
index f6a6e5e..b5d98c0 100644 (file)
@@ -52,7 +52,7 @@ uint8_t USB_Host_GetDeviceConfigDescriptor(uint8_t ConfigNumber, uint16_t* const
        if ((ErrorCode = USB_Host_SendControlRequest(ConfigHeader)) != HOST_SENDCONTROL_Successful)
          return ErrorCode;
 
        if ((ErrorCode = USB_Host_SendControlRequest(ConfigHeader)) != HOST_SENDCONTROL_Successful)
          return ErrorCode;
 
-       *ConfigSizePtr = DESCRIPTOR_CAST(ConfigHeader, USB_Descriptor_Configuration_Header_t).TotalConfigurationSize;
+       *ConfigSizePtr = DESCRIPTOR_PCAST(ConfigHeader, USB_Descriptor_Configuration_Header_t)->TotalConfigurationSize;
 
        if (*ConfigSizePtr > BufferSize)
          return HOST_GETCONFIG_BuffOverflow;
 
        if (*ConfigSizePtr > BufferSize)
          return HOST_GETCONFIG_BuffOverflow;
@@ -114,17 +114,17 @@ void USB_GetNextDescriptorOfTypeAfter(uint16_t* const BytesRem,
          USB_GetNextDescriptorOfType(BytesRem, CurrConfigLoc, Type);
 }
                        
          USB_GetNextDescriptorOfType(BytesRem, CurrConfigLoc, Type);
 }
                        
-uint8_t USB_GetNextDescriptorComp(uint16_t* BytesRem, void** CurrConfigLoc, ConfigComparatorPtr_t ComparatorRoutine)
+uint8_t USB_GetNextDescriptorComp(uint16_t* const BytesRem, void** const CurrConfigLoc, ConfigComparatorPtr_t const ComparatorRoutine)
 {
        uint8_t ErrorCode;
                
        while (*BytesRem)
        {
 {
        uint8_t ErrorCode;
                
        while (*BytesRem)
        {
-               uint8_t*  PrevDescLoc  = *CurrConfigLoc;
-               uint16_t  PrevBytesRem = *BytesRem;
+               uint8_t* PrevDescLoc  = *CurrConfigLoc;
+               uint16_t PrevBytesRem = *BytesRem;
 
                USB_GetNextDescriptor(BytesRem, CurrConfigLoc);
 
                USB_GetNextDescriptor(BytesRem, CurrConfigLoc);
-
+                               
                if ((ErrorCode = ComparatorRoutine(*CurrConfigLoc)) != DESCRIPTOR_SEARCH_NotFound)
                {
                        if (ErrorCode == DESCRIPTOR_SEARCH_Fail)
                if ((ErrorCode = ComparatorRoutine(*CurrConfigLoc)) != DESCRIPTOR_SEARCH_NotFound)
                {
                        if (ErrorCode == DESCRIPTOR_SEARCH_Fail)