- void USB_Host_GetNextDescriptorOfTypeAfter(uint16_t* const BytesRem,\r
- uint8_t** const CurrConfigLoc,\r
- const uint8_t Type,\r
- const uint8_t AfterType)\r
- ATTR_NON_NULL_PTR_ARG(1, 2);\r
- \r
- /* Private Interface - For use in library only: */\r
- #if !defined(__DOXYGEN__)\r
- /* Function Prototypes: */\r
- uint8_t USB_Host_GetNextDescriptorComp_P(uint16_t* BytesRem, uint8_t** CurrConfigLoc,\r
- uint8_t (* const ComparatorRoutine)(void* const));\r
- #endif\r
+ void USB_GetNextDescriptorOfTypeAfter(uint16_t* const BytesRem,\r
+ uint8_t** const CurrConfigLoc,\r
+ const uint8_t Type,\r
+ const uint8_t AfterType)\r
+ ATTR_NON_NULL_PTR_ARG(1, 2);\r
+\r
+ /* Inline Functions: */\r
+ /** Skips over the current sub-descriptor inside the configuration descriptor, so that the pointer then\r
+ points to the next sub-descriptor. The bytes remaining value is automatically decremented.\r
+ *\r
+ * \param BytesRem Pointer to the number of bytes remaining of the configuration descriptor\r
+ * \param CurrConfigLoc Pointer to the current descriptor inside the configuration descriptor\r
+ */\r
+ static inline void USB_GetNextDescriptor(uint16_t* const BytesRem,\r
+ uint8_t** const CurrConfigLoc) \r
+ ATTR_NON_NULL_PTR_ARG(1, 2); \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
+ }\r