|
|
|
@ -45,7 +45,7 @@
|
|
|
|
|
|
|
|
|
|
/** \ingroup Group_EndpointPrimitiveRW
|
|
|
|
|
* \defgroup Group_EndpointPrimitiveRW_UC3B Read/Write of Primitive Data Types (UC3B)
|
|
|
|
|
* \brief Endpoint primative read/write definitions for the Atmel UC3B architecture.
|
|
|
|
|
* \brief Endpoint primative read/write definitions for the Atmel AVR32 UC3B architecture.
|
|
|
|
|
*
|
|
|
|
|
* Functions, macros, variables, enums and types related to data reading and writing of primitive data types
|
|
|
|
|
* from and to endpoints.
|
|
|
|
@ -53,14 +53,14 @@
|
|
|
|
|
|
|
|
|
|
/** \ingroup Group_EndpointPacketManagement
|
|
|
|
|
* \defgroup Group_EndpointPacketManagement_UC3B Endpoint Packet Management (UC3B)
|
|
|
|
|
* \brief Endpoint packet management definitions for the Atmel UC3B architecture.
|
|
|
|
|
* \brief Endpoint packet management definitions for the Atmel AVR32 UC3B architecture.
|
|
|
|
|
*
|
|
|
|
|
* Functions, macros, variables, enums and types related to packet management of endpoints.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/** \ingroup Group_EndpointManagement
|
|
|
|
|
* \defgroup Group_EndpointManagement_UC3B Endpoint Management (UC3B)
|
|
|
|
|
* \brief Endpoint management definitions for the Atmel UC3B architecture.
|
|
|
|
|
* \brief Endpoint management definitions for the Atmel AVR32 UC3B architecture.
|
|
|
|
|
*
|
|
|
|
|
* Functions, macros and enums related to endpoint management when in USB Device mode. This
|
|
|
|
|
* module contains the endpoint management macros, as well as endpoint interrupt and data
|
|
|
|
@ -236,7 +236,7 @@
|
|
|
|
|
/* Enums: */
|
|
|
|
|
/** Enum for the possible error return codes of the \ref Endpoint_WaitUntilReady() function.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointRW_AVR8
|
|
|
|
|
* \ingroup Group_EndpointRW_UC3B
|
|
|
|
|
*/
|
|
|
|
|
enum Endpoint_WaitUntilReady_ErrorCodes_t
|
|
|
|
|
{
|
|
|
|
@ -320,7 +320,7 @@
|
|
|
|
|
* \note The return width of this function may differ, depending on the maximum endpoint bank size
|
|
|
|
|
* of the selected AVR model.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointRW_AVR8
|
|
|
|
|
* \ingroup Group_EndpointRW_UC3B
|
|
|
|
|
*
|
|
|
|
|
* \return Total number of bytes in the currently selected Endpoint's FIFO buffer.
|
|
|
|
|
*/
|
|
|
|
@ -403,7 +403,7 @@
|
|
|
|
|
* transmission via the \ref Endpoint_ClearIN() command, or are awaiting acknowledgement via the
|
|
|
|
|
* \ref Endpoint_ClearOUT() command.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_UC3B
|
|
|
|
|
*
|
|
|
|
|
* \return Total number of busy banks in the selected endpoint.
|
|
|
|
|
*/
|
|
|
|
@ -417,7 +417,7 @@
|
|
|
|
|
* will terminate all queued transactions, resetting the endpoint banks ready for a new
|
|
|
|
|
* packet.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_UC3B
|
|
|
|
|
*/
|
|
|
|
|
static inline void Endpoint_AbortPendingIN(void)
|
|
|
|
|
{
|
|
|
|
@ -434,7 +434,7 @@
|
|
|
|
|
* is an OUT direction and no packet (or an empty packet) has been received, or if the endpoint is an IN
|
|
|
|
|
* direction and the endpoint bank is full.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_UC3B
|
|
|
|
|
*
|
|
|
|
|
* \return Boolean \c true if the currently selected endpoint may be read from or written to, depending
|
|
|
|
|
* on its direction.
|
|
|
|
@ -485,7 +485,7 @@
|
|
|
|
|
|
|
|
|
|
/** Determines if the selected IN endpoint is ready for a new packet to be sent to the host.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_UC3B
|
|
|
|
|
*
|
|
|
|
|
* \return Boolean \c true if the current endpoint is ready for an IN packet, \c false otherwise.
|
|
|
|
|
*/
|
|
|
|
@ -497,7 +497,7 @@
|
|
|
|
|
|
|
|
|
|
/** Determines if the selected OUT endpoint has received new packet from the host.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_UC3B
|
|
|
|
|
*
|
|
|
|
|
* \return Boolean \c true if current endpoint is has received an OUT packet, \c false otherwise.
|
|
|
|
|
*/
|
|
|
|
@ -509,7 +509,7 @@
|
|
|
|
|
|
|
|
|
|
/** Determines if the current CONTROL type endpoint has received a SETUP packet.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_UC3B
|
|
|
|
|
*
|
|
|
|
|
* \return Boolean \c true if the selected endpoint has received a SETUP packet, \c false otherwise.
|
|
|
|
|
*/
|
|
|
|
@ -522,7 +522,7 @@
|
|
|
|
|
/** Clears a received SETUP packet on the currently selected CONTROL type endpoint, freeing up the
|
|
|
|
|
* endpoint for the next packet.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_UC3B
|
|
|
|
|
*
|
|
|
|
|
* \note This is not applicable for non CONTROL type endpoints.
|
|
|
|
|
*/
|
|
|
|
@ -535,7 +535,7 @@
|
|
|
|
|
/** Sends an IN packet to the host on the currently selected endpoint, freeing up the endpoint for the
|
|
|
|
|
* next packet and switching to the alternative endpoint bank if double banked.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_UC3B
|
|
|
|
|
*/
|
|
|
|
|
static inline void Endpoint_ClearIN(void) ATTR_ALWAYS_INLINE;
|
|
|
|
|
static inline void Endpoint_ClearIN(void)
|
|
|
|
@ -547,7 +547,7 @@
|
|
|
|
|
/** Acknowledges an OUT packet to the host on the currently selected endpoint, freeing up the endpoint
|
|
|
|
|
* for the next packet and switching to the alternative endpoint bank if double banked.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_UC3B
|
|
|
|
|
*/
|
|
|
|
|
static inline void Endpoint_ClearOUT(void) ATTR_ALWAYS_INLINE;
|
|
|
|
|
static inline void Endpoint_ClearOUT(void)
|
|
|
|
@ -565,7 +565,7 @@
|
|
|
|
|
* is called, or the host issues a CLEAR FEATURE request to the device for the currently selected
|
|
|
|
|
* endpoint.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_UC3B
|
|
|
|
|
*/
|
|
|
|
|
static inline void Endpoint_StallTransaction(void) ATTR_ALWAYS_INLINE;
|
|
|
|
|
static inline void Endpoint_StallTransaction(void)
|
|
|
|
@ -575,7 +575,7 @@
|
|
|
|
|
|
|
|
|
|
/** Clears the STALL condition on the currently selected endpoint.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_UC3B
|
|
|
|
|
*/
|
|
|
|
|
static inline void Endpoint_ClearStall(void) ATTR_ALWAYS_INLINE;
|
|
|
|
|
static inline void Endpoint_ClearStall(void)
|
|
|
|
@ -585,7 +585,7 @@
|
|
|
|
|
|
|
|
|
|
/** Determines if the currently selected endpoint is stalled, false otherwise.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPacketManagement_UC3B
|
|
|
|
|
*
|
|
|
|
|
* \return Boolean \c true if the currently selected endpoint is stalled, \c false otherwise.
|
|
|
|
|
*/
|
|
|
|
@ -624,7 +624,7 @@
|
|
|
|
|
|
|
|
|
|
/** Reads one byte from the currently selected endpoint's bank, for OUT direction endpoints.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_AVR32
|
|
|
|
|
*
|
|
|
|
|
* \return Next byte in the currently selected endpoint's FIFO buffer.
|
|
|
|
|
*/
|
|
|
|
@ -636,7 +636,7 @@
|
|
|
|
|
|
|
|
|
|
/** Writes one byte from the currently selected endpoint's bank, for IN direction endpoints.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_AVR32
|
|
|
|
|
*
|
|
|
|
|
* \param[in] Byte Next byte to write into the the currently selected endpoint's FIFO buffer.
|
|
|
|
|
*/
|
|
|
|
@ -648,7 +648,7 @@
|
|
|
|
|
|
|
|
|
|
/** Discards one byte from the currently selected endpoint's bank, for OUT direction endpoints.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_UC3B
|
|
|
|
|
*/
|
|
|
|
|
static inline void Endpoint_Discard_Byte(void) ATTR_ALWAYS_INLINE;
|
|
|
|
|
static inline void Endpoint_Discard_Byte(void)
|
|
|
|
@ -661,7 +661,7 @@
|
|
|
|
|
/** Reads two bytes from the currently selected endpoint's bank in little endian format, for OUT
|
|
|
|
|
* direction endpoints.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_UC3B
|
|
|
|
|
*
|
|
|
|
|
* \return Next word in the currently selected endpoint's FIFO buffer.
|
|
|
|
|
*/
|
|
|
|
@ -683,7 +683,7 @@
|
|
|
|
|
/** Reads two bytes from the currently selected endpoint's bank in big endian format, for OUT
|
|
|
|
|
* direction endpoints.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_UC3B
|
|
|
|
|
*
|
|
|
|
|
* \return Next word in the currently selected endpoint's FIFO buffer.
|
|
|
|
|
*/
|
|
|
|
@ -705,7 +705,7 @@
|
|
|
|
|
/** Writes two bytes to the currently selected endpoint's bank in little endian format, for IN
|
|
|
|
|
* direction endpoints.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_UC3B
|
|
|
|
|
*
|
|
|
|
|
* \param[in] Word Next word to write to the currently selected endpoint's FIFO buffer.
|
|
|
|
|
*/
|
|
|
|
@ -719,7 +719,7 @@
|
|
|
|
|
/** Writes two bytes to the currently selected endpoint's bank in big endian format, for IN
|
|
|
|
|
* direction endpoints.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_UC3B
|
|
|
|
|
*
|
|
|
|
|
* \param[in] Word Next word to write to the currently selected endpoint's FIFO buffer.
|
|
|
|
|
*/
|
|
|
|
@ -732,7 +732,7 @@
|
|
|
|
|
|
|
|
|
|
/** Discards two bytes from the currently selected endpoint's bank, for OUT direction endpoints.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_UC3B
|
|
|
|
|
*/
|
|
|
|
|
static inline void Endpoint_Discard_Word(void) ATTR_ALWAYS_INLINE;
|
|
|
|
|
static inline void Endpoint_Discard_Word(void)
|
|
|
|
@ -746,7 +746,7 @@
|
|
|
|
|
/** Reads four bytes from the currently selected endpoint's bank in little endian format, for OUT
|
|
|
|
|
* direction endpoints.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_UC3B
|
|
|
|
|
*
|
|
|
|
|
* \return Next double word in the currently selected endpoint's FIFO buffer.
|
|
|
|
|
*/
|
|
|
|
@ -770,7 +770,7 @@
|
|
|
|
|
/** Reads four bytes from the currently selected endpoint's bank in big endian format, for OUT
|
|
|
|
|
* direction endpoints.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_UC3B
|
|
|
|
|
*
|
|
|
|
|
* \return Next double word in the currently selected endpoint's FIFO buffer.
|
|
|
|
|
*/
|
|
|
|
@ -794,7 +794,7 @@
|
|
|
|
|
/** Writes four bytes to the currently selected endpoint's bank in little endian format, for IN
|
|
|
|
|
* direction endpoints.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_UC3B
|
|
|
|
|
*
|
|
|
|
|
* \param[in] DWord Next double word to write to the currently selected endpoint's FIFO buffer.
|
|
|
|
|
*/
|
|
|
|
@ -810,7 +810,7 @@
|
|
|
|
|
/** Writes four bytes to the currently selected endpoint's bank in big endian format, for IN
|
|
|
|
|
* direction endpoints.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_UC3B
|
|
|
|
|
*
|
|
|
|
|
* \param[in] DWord Next double word to write to the currently selected endpoint's FIFO buffer.
|
|
|
|
|
*/
|
|
|
|
@ -825,7 +825,7 @@
|
|
|
|
|
|
|
|
|
|
/** Discards four bytes from the currently selected endpoint's bank, for OUT direction endpoints.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_AVR8
|
|
|
|
|
* \ingroup Group_EndpointPrimitiveRW_UC3B
|
|
|
|
|
*/
|
|
|
|
|
static inline void Endpoint_Discard_DWord(void) ATTR_ALWAYS_INLINE;
|
|
|
|
|
static inline void Endpoint_Discard_DWord(void)
|
|
|
|
@ -872,7 +872,7 @@
|
|
|
|
|
*
|
|
|
|
|
* \note This routine should not be called on CONTROL type endpoints.
|
|
|
|
|
*
|
|
|
|
|
* \ingroup Group_EndpointRW_AVR8
|
|
|
|
|
* \ingroup Group_EndpointRW_UC3B
|
|
|
|
|
*
|
|
|
|
|
* \return A value from the \ref Endpoint_WaitUntilReady_ErrorCodes_t enum.
|
|
|
|
|
*/
|
|
|
|
|