- /** Searches for the next descriptor in the given configuration descriptor using a premade comparator\r
- * function. The routine updates the position and remaining configuration descriptor bytes values\r
- * automatically. If a comparator routine fails a search, the descriptor pointer is retreated back\r
- * so that the next descriptor search invocation will start from the descriptor which first caused the\r
- * original search to fail. This behaviour allows for one comparator to be used immediately after another\r
- * has failed, starting the second search from the descriptor which failed the first.\r
- *\r
- * \param DSize Pointer to an int storing the remaining bytes in the configuration descriptor\r
- * \param DPos Pointer to the current position in the configuration descriptor\r
- * \param DSearch Name of the comparator search function to use on the configuration descriptor\r
- *\r
- * \return Value of one of the members of the DSearch_Comp_Return_ErrorCodes_t enum\r
- *\r
- * Usage Example:\r
- * \code\r
- * DESCRIPTOR_COMPARATOR(EndpointSearcher); // Comparator Prototype\r
- *\r
- * DESCRIPTOR_COMPARATOR(EndpointSearcher)\r
- * {\r
- * if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Endpoint)\r
- * return Descriptor_Search_Found;\r
- * else\r
- * return Descriptor_Search_NotFound;\r
- * }\r
- *\r
- * //...\r
- * // After retrieving configuration descriptor:\r
- * if (USB_Host_GetNextDescriptorComp(&BytesRemaining, &ConfigDescriptorData, EndpointSearcher) ==\r
- * Descriptor_Search_Comp_Found)\r
- * {\r
- * // Do something with the endpoint descriptor\r
- * }\r
- * \endcode\r
- */\r
- #define USB_Host_GetNextDescriptorComp(DSize, DPos, DSearch) \\r
- USB_Host_GetNextDescriptorComp_P(DSize, DPos, DCOMP_##DSearch)\r
+ /* Psuedo-Functions: */\r
+ #if defined(__DOXYGEN__)\r
+ /** Searches for the next descriptor in the given configuration descriptor using a premade comparator\r
+ * function. The routine updates the position and remaining configuration descriptor bytes values\r
+ * automatically. If a comparator routine fails a search, the descriptor pointer is retreated back\r
+ * so that the next descriptor search invocation will start from the descriptor which first caused the\r
+ * original search to fail. This behaviour allows for one comparator to be used immediately after another\r
+ * has failed, starting the second search from the descriptor which failed the first.\r
+ *\r
+ * \note This function is available in USB Host mode only.\r
+ *\r
+ * \param BytesRem Pointer to an int storing the remaining bytes in the configuration descriptor\r
+ * \param CurrConfigLoc Pointer to the current position in the configuration descriptor\r
+ * \param ComparatorRoutine Name of the comparator search function to use on the configuration descriptor\r
+ *\r
+ * \return Value of one of the members of the DSearch_Comp_Return_ErrorCodes_t enum\r
+ *\r
+ * Usage Example:\r
+ * \code\r
+ * DESCRIPTOR_COMPARATOR(EndpointSearcher); // Comparator Prototype\r
+ *\r
+ * DESCRIPTOR_COMPARATOR(EndpointSearcher)\r
+ * {\r
+ * if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Endpoint)\r
+ * return Descriptor_Search_Found;\r
+ * else\r
+ * return Descriptor_Search_NotFound;\r
+ * }\r
+ *\r
+ * //...\r
+ * // After retrieving configuration descriptor:\r
+ * if (USB_Host_GetNextDescriptorComp(&BytesRemaining, &ConfigDescriptorData, EndpointSearcher) ==\r
+ * Descriptor_Search_Comp_Found)\r
+ * {\r
+ * // Do something with the endpoint descriptor\r
+ * }\r
+ * \endcode\r
+ */\r
+ uint8_t USB_GetNextDescriptorComp(uint16_t* BytesRem, uint8_t** CurrConfigLoc, ComparatorPtr_t ComparatorRoutine);\r
+ #else\r
+ #define USB_GetNextDescriptorComp(DSize, DPos, DSearch) USB_GetNextDescriptorComp_P(DSize, DPos, DCOMP_##DSearch)\r
+ #endif\r
+ \r