X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/049e9309637cd057689cf273b2023afb0d6876ae..d4b45e8502a27c0f5ad3e26eabd2b30e84c20bac:/LUFA/Drivers/USB/Core/ConfigDescriptor.c diff --git a/LUFA/Drivers/USB/Core/ConfigDescriptor.c b/LUFA/Drivers/USB/Core/ConfigDescriptor.c index a7f4d3ba0..5bdcdc663 100644 --- a/LUFA/Drivers/USB/Core/ConfigDescriptor.c +++ b/LUFA/Drivers/USB/Core/ConfigDescriptor.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2011. + Copyright (C) Dean Camera, 2012. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -54,7 +54,7 @@ uint8_t USB_Host_GetDeviceConfigDescriptor(const uint8_t ConfigNumber, if ((ErrorCode = USB_Host_SendControlRequest(ConfigHeader)) != HOST_SENDCONTROL_Successful) return ErrorCode; - *ConfigSizePtr = DESCRIPTOR_PCAST(ConfigHeader, USB_Descriptor_Configuration_Header_t)->TotalConfigurationSize; + *ConfigSizePtr = le16_to_cpu(DESCRIPTOR_PCAST(ConfigHeader, USB_Descriptor_Configuration_Header_t)->TotalConfigurationSize); if (*ConfigSizePtr > BufferSize) return HOST_GETCONFIG_BuffOverflow; @@ -118,7 +118,7 @@ void USB_GetNextDescriptorOfTypeAfter(uint16_t* const BytesRem, uint8_t USB_GetNextDescriptorComp(uint16_t* const BytesRem, void** const CurrConfigLoc, - const ConfigComparatorPtr_t const ComparatorRoutine) + ConfigComparatorPtr_t const ComparatorRoutine) { uint8_t ErrorCode;