X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/b221e7d175e4b5ca463fdd6d05b8c3fc71bd7c40..d6edfe35c8a9490407e4a5e34f8e5108c6a260a3:/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h?ds=inline diff --git a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h index be24debba..6d57d2e78 100644 --- a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h +++ b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h @@ -78,7 +78,7 @@ * // Can now access elements of the configuration header struct using the -> indirection operator * \endcode */ - #define DESCRIPTOR_PCAST(DescriptorPtr, Type) ((Type*)DescriptorPtr) + #define DESCRIPTOR_PCAST(DescriptorPtr, Type) ((Type*)(DescriptorPtr)) /** Casts a pointer to a descriptor inside the configuration descriptor into the given descriptor * type (as an actual struct instance rather than a pointer to a struct). @@ -152,9 +152,10 @@ * } * \endcode */ - uint8_t USB_GetNextDescriptorComp(uint16_t* BytesRem, uint8_t** CurrConfigLoc, ConfigComparatorPtr_t ComparatorRoutine); + uint8_t USB_GetNextDescriptorComp(uint16_t* BytesRem, void** CurrConfigLoc, ConfigComparatorPtr_t ComparatorRoutine); /* Enums: */ + /** Enum for the possible return codes of the \ref USB_GetDeviceConfigDescriptor() function. */ enum USB_Host_GetConfigDescriptor_ErrorCodes_t { HOST_GETCONFIG_Successful = 0, /**< No error occurred while retrieving the configuration descriptor */ @@ -212,7 +213,7 @@ * \param[in] Type Descriptor type value to search for */ void USB_GetNextDescriptorOfType(uint16_t* const BytesRem, - uint8_t** const CurrConfigLoc, + void** const CurrConfigLoc, const uint8_t Type) ATTR_NON_NULL_PTR_ARG(1, 2); @@ -227,7 +228,7 @@ * \param[in] BeforeType Descriptor type value which must not be reached before the given Type descriptor */ void USB_GetNextDescriptorOfTypeBefore(uint16_t* const BytesRem, - uint8_t** const CurrConfigLoc, + void** const CurrConfigLoc, const uint8_t Type, const uint8_t BeforeType) ATTR_NON_NULL_PTR_ARG(1, 2); @@ -242,7 +243,7 @@ * \param[in] AfterType Descriptor type value which must be reached before the given Type descriptor */ void USB_GetNextDescriptorOfTypeAfter(uint16_t* const BytesRem, - uint8_t** const CurrConfigLoc, + void** const CurrConfigLoc, const uint8_t Type, const uint8_t AfterType) ATTR_NON_NULL_PTR_ARG(1, 2); @@ -255,10 +256,10 @@ * \param[in,out] CurrConfigLoc Pointer to the current descriptor inside the configuration descriptor */ static inline void USB_GetNextDescriptor(uint16_t* const BytesRem, - uint8_t** const CurrConfigLoc) + void** const CurrConfigLoc) ATTR_NON_NULL_PTR_ARG(1, 2); static inline void USB_GetNextDescriptor(uint16_t* const BytesRem, - uint8_t** const CurrConfigLoc) + void** const CurrConfigLoc) { uint16_t CurrDescriptorSize = DESCRIPTOR_CAST(*CurrConfigLoc, USB_Descriptor_Header_t).Size;