\r
/* Public Interface - May be used in end-application: */\r
/* Macros: */\r
- /** Endpoint data direction mask for Endpoint_ConfigureEndpoint(). This indicates that the endpoint\r
+ /** Endpoint data direction mask for \ref Endpoint_ConfigureEndpoint(). This indicates that the endpoint\r
* should be initialized in the OUT direction - i.e. data flows from host to device.\r
*/\r
#define ENDPOINT_DIR_OUT (0 << EPDIR)\r
\r
- /** Endpoint data direction mask for Endpoint_ConfigureEndpoint(). This indicates that the endpoint\r
+ /** Endpoint data direction mask for \ref Endpoint_ConfigureEndpoint(). This indicates that the endpoint\r
* should be initialized in the IN direction - i.e. data flows from device to host.\r
*/\r
#define ENDPOINT_DIR_IN (1 << EPDIR)\r
\r
- /** Mask for the bank mode selection for the Endpoint_ConfigureEndpoint() macro. This indicates\r
+ /** Mask for the bank mode selection for the \ref Endpoint_ConfigureEndpoint() macro. This indicates\r
* that the endpoint should have one single bank, which requires less USB FIFO memory but results\r
* in slower transfers as only one USB device (the AVR or the host) can access the endpoint's\r
* bank at the one time.\r
*/\r
#define ENDPOINT_BANK_SINGLE (0 << EPBK0)\r
\r
- /** Mask for the bank mode selection for the Endpoint_ConfigureEndpoint() macro. This indicates\r
+ /** Mask for the bank mode selection for the \ref Endpoint_ConfigureEndpoint() macro. This indicates\r
* that the endpoint should have two banks, which requires more USB FIFO memory but results\r
* in faster transfers as one USB device (the AVR or the host) can access one bank while the other\r
* accesses the second bank.\r
* \note This interrupt must be enabled and cleared on *each* endpoint which requires it (after the\r
* endpoint is selected), and will fire the common endpoint interrupt vector.\r
*\r
- * \see ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.\r
+ * \see \ref ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.\r
*/\r
#define ENDPOINT_INT_SETUP UEIENX, (1 << RXSTPE), UEINTX, (1 << RXSTPI)\r
\r
* \note This interrupt must be enabled and cleared on *each* endpoint which requires it (after the\r
* endpoint is selected), and will fire the common endpoint interrupt vector.\r
*\r
- * \see ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.\r
+ * \see \ref ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.\r
*/\r
#define ENDPOINT_INT_IN UEIENX, (1 << TXINE) , UEINTX, (1 << TXINI)\r
\r
* \note This interrupt must be enabled and cleared on *each* endpoint which requires it (after the\r
* endpoint is selected), and will fire the common endpoint interrupt vector.\r
*\r
- * \see ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.\r
+ * \see \ref ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.\r
*/\r
#define ENDPOINT_INT_OUT UEIENX, (1 << RXOUTE), UEINTX, (1 << RXOUTI)\r
\r
static inline uint8_t Endpoint_GetCurrentEndpoint(void);\r
\r
/** Selects the given endpoint number. If the address from the device descriptors is used, the\r
- * value should be masked with the ENDPOINT_EPNUM_MASK constant to extract only the endpoint\r
+ * value should be masked with the \ref ENDPOINT_EPNUM_MASK constant to extract only the endpoint\r
* number (and discarding the endpoint direction bit).\r
*\r
* Any endpoint operations which do not require the endpoint number to be indicated will operate on\r
/** Enables the currently selected endpoint so that data can be sent and received through it to\r
* and from a host.\r
*\r
- * \note Endpoints must first be configured properly rather than just being enabled via the\r
- * Endpoint_ConfigureEndpoint() macro, which calls Endpoint_EnableEndpoint() automatically.\r
+ * \note Endpoints must first be configured properly via \ref Endpoint_ConfigureEndpoint().\r
*/\r
static inline void Endpoint_EnableEndpoint(void);\r
\r
* way for devices to indicate invalid commands to the host so that the current transfer can be\r
* aborted and the host can begin its own recovery sequence.\r
*\r
- * The currently selected endpoint remains stalled until either the Endpoint_ClearStall() macro\r
+ * The currently selected endpoint remains stalled until either the \ref Endpoint_ClearStall() macro\r
* is called, or the host issues a CLEAR FEATURE request to the device for the currently selected\r
* endpoint.\r
*\r
#endif\r
\r
/* Enums: */\r
- /** Enum for the possible error return codes of the Endpoint_WaitUntilReady function.\r
+ /** Enum for the possible error return codes of the \ref Endpoint_WaitUntilReady() function.\r
*\r
* \ingroup Group_EndpointRW\r
*/\r
*/ \r
ENDPOINT_READYWAIT_Timeout = 3, /**< The host failed to accept or send the next packet\r
* within the software timeout period set by the\r
- * USB_STREAM_TIMEOUT_MS macro.\r
+ * \ref USB_STREAM_TIMEOUT_MS macro.\r
*/\r
};\r
\r
*/\r
ENDPOINT_RWSTREAM_ERROR_Timeout = 2, /**< The host failed to accept or send the next packet\r
* within the software timeout period set by the\r
- * USB_STREAM_TIMEOUT_MS macro.\r
+ * \ref USB_STREAM_TIMEOUT_MS macro.\r
*/\r
ENDPOINT_RWSTREAM_ERROR_CallbackAborted = 3, /**< Indicates that the stream's callback function\r
* aborted the transfer early.\r
* device (i.e. endpoint 1 should be configured before endpoint 2 and so on).\r
*\r
* The endpoint type may be one of the EP_TYPE_* macros listed in LowLevel.h and the direction\r
- * may be either ENDPOINT_DIR_OUT or ENDPOINT_DIR_IN.\r
+ * may be either \ref ENDPOINT_DIR_OUT or \ref ENDPOINT_DIR_IN.\r
*\r
* The bank size must indicate the maximum packet size that the endpoint can handle. Different\r
* endpoint numbers can handle different maximum packet sizes - refer to the chosen USB AVR's\r
* datasheet to determine the maximum bank size for each endpoint.\r
*\r
- * The banking mode may be either ENDPOINT_BANK_SINGLE or ENDPOINT_BANK_DOUBLE.\r
+ * The banking mode may be either \ref ENDPOINT_BANK_SINGLE or \ref ENDPOINT_BANK_DOUBLE.\r
*\r
- * The success of this routine can be determined via the Endpoint_IsConfigured() macro.\r
+ * The success of this routine can be determined via the \ref Endpoint_IsConfigured() macro.\r
*\r
* By default, the routine is entirely dynamic, and will accept both constant and variable inputs.\r
* If dynamic configuration is unused, a small space savings can be made by defining the\r
*\r
* \ingroup Group_EndpointRW\r
*\r
- * \return A value from the Endpoint_WaitUntilReady_ErrorCodes_t enum.\r
+ * \return A value from the \ref Endpoint_WaitUntilReady_ErrorCodes_t enum.\r
*/\r
uint8_t Endpoint_WaitUntilReady(void);\r
\r
/** Reads and discards the given number of bytes from the endpoint from the given buffer,\r
* discarding fully read packets from the host as needed. The last packet is not automatically\r
* discarded once the remaining bytes has been read; the user is responsible for manually\r
- * discarding the last packet from the host via the Endpoint_ClearOUT() macro. Between\r
+ * discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro. Between\r
* each USB packet, the given stream callback function is executed repeatedly until the next\r
* packet is ready, allowing for early aborts of stream transfers.\r
*\r
- * The callback routine should be created using the STREAM_CALLBACK() macro. If the token\r
+ * The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token\r
* NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled\r
* and this function has the Callback parameter omitted.\r
*\r
* \param Length Number of bytes to send via the currently selected endpoint.\r
* \param Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback\r
*\r
- * \return A value from the Endpoint_Stream_RW_ErrorCodes_t enum.\r
+ * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
*/\r
uint8_t Endpoint_Discard_Stream(uint16_t Length\r
#if !defined(NO_STREAM_CALLBACKS) || defined(__DOXYGEN__)\r
/** Writes the given number of bytes to the endpoint from the given buffer in little endian,\r
* sending full packets to the host as needed. The last packet filled is not automatically sent;\r
* the user is responsible for manually sending the last written packet to the host via the\r
- * Endpoint_ClearIN() macro. Between each USB packet, the given stream callback function\r
+ * \ref Endpoint_ClearIN() macro. Between each USB packet, the given stream callback function\r
* is executed repeatedly until the endpoint is ready to accept the next packet, allowing for early\r
* aborts of stream transfers.\r
*\r
- * The callback routine should be created using the STREAM_CALLBACK() macro. If the token\r
+ * The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token\r
* NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled\r
* and this function has the Callback parameter omitted.\r
*\r
* \param Length Number of bytes to read for the currently selected endpoint into the buffer.\r
* \param Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback\r
*\r
- * \return A value from the Endpoint_Stream_RW_ErrorCodes_t enum.\r
+ * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
*/\r
uint8_t Endpoint_Write_Stream_LE(const void* Buffer, uint16_t Length\r
#if !defined(NO_STREAM_CALLBACKS) || defined(__DOXYGEN__)\r
/** Writes the given number of bytes to the endpoint from the given buffer in big endian,\r
* sending full packets to the host as needed. The last packet filled is not automatically sent;\r
* the user is responsible for manually sending the last written packet to the host via the\r
- * Endpoint_ClearIN() macro. Between each USB packet, the given stream callback function\r
+ * \ref Endpoint_ClearIN() macro. Between each USB packet, the given stream callback function\r
* is executed repeatedly until the endpoint is ready to accept the next packet, allowing for early\r
* aborts of stream transfers.\r
*\r
- * The callback routine should be created using the STREAM_CALLBACK() macro. If the token\r
+ * The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token\r
* NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled\r
* and this function has the Callback parameter omitted.\r
*\r
* \param Length Number of bytes to read for the currently selected endpoint into the buffer.\r
* \param Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback\r
*\r
- * \return A value from the Endpoint_Stream_RW_ErrorCodes_t enum.\r
+ * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
*/\r
uint8_t Endpoint_Write_Stream_BE(const void* Buffer, uint16_t Length\r
#if !defined(NO_STREAM_CALLBACKS) || defined(__DOXYGEN__)\r
/** Reads the given number of bytes from the endpoint from the given buffer in little endian,\r
* discarding fully read packets from the host as needed. The last packet is not automatically\r
* discarded once the remaining bytes has been read; the user is responsible for manually\r
- * discarding the last packet from the host via the Endpoint_ClearOUT() macro. Between\r
+ * discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro. Between\r
* each USB packet, the given stream callback function is executed repeatedly until the endpoint\r
* is ready to accept the next packet, allowing for early aborts of stream transfers.\r
*\r
- * The callback routine should be created using the STREAM_CALLBACK() macro. If the token\r
+ * The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token\r
* NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled\r
* and this function has the Callback parameter omitted.\r
*\r
* \param Length Number of bytes to send via the currently selected endpoint.\r
* \param Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback\r
*\r
- * \return A value from the Endpoint_Stream_RW_ErrorCodes_t enum.\r
+ * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
*/\r
uint8_t Endpoint_Read_Stream_LE(void* Buffer, uint16_t Length\r
#if !defined(NO_STREAM_CALLBACKS) || defined(__DOXYGEN__)\r
/** Reads the given number of bytes from the endpoint from the given buffer in big endian,\r
* discarding fully read packets from the host as needed. The last packet is not automatically\r
* discarded once the remaining bytes has been read; the user is responsible for manually\r
- * discarding the last packet from the host via the Endpoint_ClearOUT() macro. Between\r
+ * discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro. Between\r
* each USB packet, the given stream callback function is executed repeatedly until the endpoint\r
* is ready to accept the next packet, allowing for early aborts of stream transfers.\r
*\r
- * The callback routine should be created using the STREAM_CALLBACK() macro. If the token\r
+ * The callback routine should be created using the \ref STREAM_CALLBACK() macro. If the token\r
* NO_STREAM_CALLBACKS is passed via the -D option to the compiler, stream callbacks are disabled\r
* and this function has the Callback parameter omitted.\r
*\r
* \param Length Number of bytes to send via the currently selected endpoint.\r
* \param Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback\r
*\r
- * \return A value from the Endpoint_Stream_RW_ErrorCodes_t enum.\r
+ * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
*/\r
uint8_t Endpoint_Read_Stream_BE(void* Buffer, uint16_t Length\r
#if !defined(NO_STREAM_CALLBACKS) || defined(__DOXYGEN__)\r
/** Writes the given number of bytes to the CONTROL type endpoint from the given buffer in little endian,\r
* sending full packets to the host as needed. The host OUT acknowledgement is not automatically cleared\r
* in both failure and success states; the user is responsible for manually clearing the setup OUT to\r
- * finalize the transfer via the Endpoint_ClearOUT() macro.\r
+ * finalize the transfer via the \ref Endpoint_ClearOUT() macro.\r
*\r
* \note This routine should only be used on CONTROL type endpoints.\r
*\r
* \param Buffer Pointer to the source data buffer to read from.\r
* \param Length Number of bytes to read for the currently selected endpoint into the buffer.\r
*\r
- * \return A value from the Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
+ * \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
*/\r
uint8_t Endpoint_Write_Control_Stream_LE(const void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
\r
/** Writes the given number of bytes to the CONTROL type endpoint from the given buffer in big endian,\r
* sending full packets to the host as needed. The host OUT acknowledgement is not automatically cleared\r
* in both failure and success states; the user is responsible for manually clearing the setup OUT to\r
- * finalize the transfer via the Endpoint_ClearOUT() macro.\r
+ * finalize the transfer via the \ref Endpoint_ClearOUT() macro.\r
*\r
* \note This routine should only be used on CONTROL type endpoints.\r
*\r
* \param Buffer Pointer to the source data buffer to read from.\r
* \param Length Number of bytes to read for the currently selected endpoint into the buffer.\r
*\r
- * \return A value from the Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
+ * \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
*/\r
uint8_t Endpoint_Write_Control_Stream_BE(const void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
\r
/** Reads the given number of bytes from the CONTROL endpoint from the given buffer in little endian,\r
* discarding fully read packets from the host as needed. The device IN acknowledgement is not\r
* automatically sent after success or failure states; the user is responsible for manually sending the\r
- * setup IN to finalize the transfer via the Endpoint_ClearIN() macro.\r
+ * setup IN to finalize the transfer via the \ref Endpoint_ClearIN() macro.\r
*\r
* \note This routine should only be used on CONTROL type endpoints.\r
*\r
* \param Buffer Pointer to the destination data buffer to write to.\r
* \param Length Number of bytes to send via the currently selected endpoint.\r
*\r
- * \return A value from the Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
+ * \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
*/\r
uint8_t Endpoint_Read_Control_Stream_LE(void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
\r
/** Reads the given number of bytes from the CONTROL endpoint from the given buffer in big endian,\r
* discarding fully read packets from the host as needed. The device IN acknowledgement is not\r
* automatically sent after success or failure states; the user is responsible for manually sending the\r
- * setup IN to finalize the transfer via the Endpoint_ClearIN() macro.\r
+ * setup IN to finalize the transfer via the \ref Endpoint_ClearIN() macro.\r
*\r
* \note This routine should only be used on CONTROL type endpoints.\r
*\r
* \param Buffer Pointer to the destination data buffer to write to.\r
* \param Length Number of bytes to send via the currently selected endpoint.\r
*\r
- * \return A value from the Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
+ * \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
*/\r
uint8_t Endpoint_Read_Control_Stream_BE(void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1); \r
\r