* This value's meaning depends on the descriptor's placement in the descriptor, but standard type\r
* values can be accessed in the \ref USB_DescriptorTypes_t enum.\r
*/\r
- #if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES) || defined(__DOXYGEN__)\r
- #define DESCRIPTOR_TYPE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).Type\r
- #else\r
- #define DESCRIPTOR_TYPE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).bDescriptorType \r
- #endif\r
+ #define DESCRIPTOR_TYPE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).Type\r
\r
/** Returns the descriptor's size, expressed as the 8-bit value indicating the number of bytes. */\r
- #if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES) || defined(__DOXYGEN__)\r
- #define DESCRIPTOR_SIZE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).Size\r
- #else\r
- #define DESCRIPTOR_SIZE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).bLength\r
- #endif\r
+ #define DESCRIPTOR_SIZE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).Size\r
\r
/* Type Defines: */\r
/** Type define for a Configuration Descriptor comparator function (function taking a pointer to an array\r
*\r
* //...\r
* // After retrieving configuration descriptor:\r
- * if (USB_Host_GetNextDescriptorComp(&BytesRemaining, &ConfigDescriptorData, EndpointSearcher) ==\r
+ * if (USB_Host_GetNextDescriptorComp(&BytesRemaining, &CurrentConfigLoc, EndpointSearcher) ==\r
* Descriptor_Search_Comp_Found)\r
* {\r
* // Do something with the endpoint descriptor\r
uint8_t USB_GetNextDescriptorComp(uint16_t* BytesRem, uint8_t** CurrConfigLoc, ConfigComparatorPtr_t ComparatorRoutine);\r
\r
/* Enums: */\r
+ /** Enum for the possible return codes of the \ref USB_GetDeviceConfigDescriptor() function. */\r
enum USB_Host_GetConfigDescriptor_ErrorCodes_t\r
{\r
HOST_GETCONFIG_Successful = 0, /**< No error occurred while retrieving the configuration descriptor */\r
static inline void USB_GetNextDescriptor(uint16_t* const BytesRem,\r
uint8_t** const CurrConfigLoc)\r
{\r
- #if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES)\r
uint16_t CurrDescriptorSize = DESCRIPTOR_CAST(*CurrConfigLoc, USB_Descriptor_Header_t).Size;\r
- #else\r
- uint16_t CurrDescriptorSize = DESCRIPTOR_CAST(*CurrConfigLoc, USB_Descriptor_Header_t).bLength; \r
- #endif\r
\r
*CurrConfigLoc += CurrDescriptorSize;\r
*BytesRem -= CurrDescriptorSize;\r