Added new EEPROM and FLASH buffer versions of the Endpoint and Pipe stream functions...
[pub/lufa.git] / LUFA / Drivers / USB / LowLevel / Endpoint.h
index 772d1fe..2caea83 100644 (file)
  *  Functions, macros, variables, enums and types related to data reading and writing from and to endpoints.\r
  */\r
  \r
+/** \ingroup Group_EndpointRW  \r
+ *  @defgroup Group_EndpointPrimitiveRW Read/Write of Primitive Data Types\r
+ *\r
+ *  Functions, macros, variables, enums and types related to data reading and writing of primitive data types\r
+ *  from and to endpoints.\r
+ */ \r
+\r
+/** \ingroup Group_EndpointRW  \r
+ *  @defgroup Group_EndpointStreamRW Read/Write of Multi-Byte Streams\r
+ *\r
+ *  Functions, macros, variables, enums and types related to data reading and writing of data streams from\r
+ *  and to endpoints.\r
+ */ \r
+\r
 /** @defgroup Group_EndpointPacketManagement Endpoint Packet Management\r
  *\r
  *  Functions, macros, variables, enums and types related to packet management of endpoints.\r
@@ -53,6 +67,8 @@
 \r
        /* Includes: */\r
                #include <avr/io.h>\r
+               #include <avr/pgmspace.h>\r
+               #include <avr/eeprom.h>\r
                #include <stdbool.h>\r
 \r
                #include "../../../Common/Common.h"\r
                \r
                        /** Enum for the possible error return codes of the Endpoint_*_Stream_* functions.\r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointStreamRW\r
                         */\r
                        enum Endpoint_Stream_RW_ErrorCodes_t\r
                        {\r
                        \r
                        /** Enum for the possible error return codes of the Endpoint_*_Control_Stream_* functions..\r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointStreamRW\r
                         */\r
                        enum Endpoint_ControlStream_RW_ErrorCodes_t\r
                        {\r
                /* Inline Functions: */\r
                        /** Reads one byte from the currently selected endpoint's bank, for OUT direction endpoints.\r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointPrimitiveRW\r
                         *\r
                         *  \return Next byte in the currently selected endpoint's FIFO buffer\r
                         */\r
 \r
                        /** Writes one byte from the currently selected endpoint's bank, for IN direction endpoints.\r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointPrimitiveRW\r
                         *\r
                         *  \param[in] Byte  Next byte to write into the the currently selected endpoint's FIFO buffer\r
                         */\r
 \r
                        /** Discards one byte from the currently selected endpoint's bank, for OUT direction endpoints.\r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointPrimitiveRW\r
                         */\r
                        static inline void Endpoint_Discard_Byte(void) ATTR_ALWAYS_INLINE;\r
                        static inline void Endpoint_Discard_Byte(void)\r
                        /** Reads two bytes from the currently selected endpoint's bank in little endian format, for OUT\r
                         *  direction endpoints.\r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointPrimitiveRW\r
                         *\r
                         *  \return Next word in the currently selected endpoint's FIFO buffer\r
                         */\r
                        /** Reads two bytes from the currently selected endpoint's bank in big endian format, for OUT\r
                         *  direction endpoints.\r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointPrimitiveRW\r
                         *\r
                         *  \return Next word in the currently selected endpoint's FIFO buffer\r
                         */\r
                        /** Writes two bytes to the currently selected endpoint's bank in little endian format, for IN\r
                         *  direction endpoints.\r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointPrimitiveRW\r
                         *\r
                         *  \param[in] Word  Next word to write to the currently selected endpoint's FIFO buffer\r
                         */\r
                        /** Writes two bytes to the currently selected endpoint's bank in big endian format, for IN\r
                         *  direction endpoints.\r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointPrimitiveRW\r
                         *\r
                         *  \param[in] Word  Next word to write to the currently selected endpoint's FIFO buffer\r
                         */\r
 \r
                        /** Discards two bytes from the currently selected endpoint's bank, for OUT direction endpoints.\r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointPrimitiveRW\r
                         */\r
                        static inline void Endpoint_Discard_Word(void) ATTR_ALWAYS_INLINE;\r
                        static inline void Endpoint_Discard_Word(void)\r
                        /** Reads four bytes from the currently selected endpoint's bank in little endian format, for OUT\r
                         *  direction endpoints.\r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointPrimitiveRW\r
                         *\r
                         *  \return Next double word in the currently selected endpoint's FIFO buffer\r
                         */\r
                        /** Reads four bytes from the currently selected endpoint's bank in big endian format, for OUT\r
                         *  direction endpoints.\r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointPrimitiveRW\r
                         *\r
                         *  \return Next double word in the currently selected endpoint's FIFO buffer\r
                         */\r
                        /** Writes four bytes to the currently selected endpoint's bank in little endian format, for IN\r
                         *  direction endpoints.\r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointPrimitiveRW\r
                         *\r
                         *  \param[in] DWord  Next double word to write to the currently selected endpoint's FIFO buffer\r
                         */\r
                        /** Writes four bytes to the currently selected endpoint's bank in big endian format, for IN\r
                         *  direction endpoints.\r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointPrimitiveRW\r
                         *\r
                         *  \param[in] DWord  Next double word to write to the currently selected endpoint's FIFO buffer\r
                         */\r
 \r
                        /** Discards four bytes from the currently selected endpoint's bank, for OUT direction endpoints.       \r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointPrimitiveRW\r
                         */\r
                        static inline void Endpoint_Discard_DWord(void) ATTR_ALWAYS_INLINE;\r
                        static inline void Endpoint_Discard_DWord(void)\r
                        #endif\r
 \r
                /* Function Prototypes: */\r
+                       #if !defined(NO_STREAM_CALLBACKS) || defined(__DOXYGEN__)\r
+                               #define _CALLBACK_PARAM     , StreamCallbackPtr_t Callback\r
+                       #else\r
+                               #define _CALLBACK_PARAM                 \r
+                       #endif\r
+               \r
                        /** Configures the specified endpoint number with the given endpoint type, direction, bank size\r
                         *  and banking mode. Endpoints should be allocated in ascending order by their address in the\r
                         *  device (i.e. endpoint 1 should be configured before endpoint 2 and so on) to prevent fragmentation\r
                        bool Endpoint_ConfigureEndpoint(const uint8_t  Number, const uint8_t Type, const uint8_t Direction,\r
                                                        const uint16_t Size, const uint8_t Banks);\r
 \r
-                       #if !defined(CONTROL_ONLY_DEVICE)\r
-\r
                        /** Spinloops until the currently selected non-control endpoint is ready for the next packet of data\r
                         *  to be read or written to it.\r
                         *\r
                         *\r
                         *  \note This routine should not be used on CONTROL type endpoints.\r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointStreamRW\r
                         *\r
                         *  \param[in] Length    Number of bytes to send via the currently selected endpoint.\r
                         *  \param[in] Callback  Name of a callback routine to call between successive USB packet transfers, NULL if no callback\r
                         *\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
-                                                       , StreamCallbackPtr_t Callback\r
-                       #endif\r
-                                                       );\r
+                       uint8_t Endpoint_Discard_Stream(uint16_t Length _CALLBACK_PARAM);\r
 \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
                         *\r
                         *  \note This routine should not be used on CONTROL type endpoints.\r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointStreamRW\r
                         *\r
                         *  \param[in] Buffer    Pointer to the source data buffer to read from.\r
                         *  \param[in] Length    Number of bytes to read for the currently selected endpoint into the buffer.\r
                         *\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
-                                                        , StreamCallbackPtr_t Callback\r
-                       #endif\r
-                                                        ) ATTR_NON_NULL_PTR_ARG(1);\r
+                       uint8_t Endpoint_Write_Stream_LE(void* Buffer, uint16_t Length _CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);\r
+\r
+                       /** EEPROM buffer source version of \ref Endpoint_Write_Stream_LE.\r
+                        *\r
+                        *  \ingroup Group_EndpointStreamRW\r
+                        *\r
+                        *  \param[in] Buffer    Pointer to the source data buffer to read from.\r
+                        *  \param[in] Length    Number of bytes to read for the currently selected endpoint into the buffer.\r
+                        *  \param[in] Callback  Name of a callback routine to call between successive USB packet transfers, NULL if no callback\r
+                        *\r
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
+                        */\r
+                       uint8_t Endpoint_Write_EStream_LE(void* Buffer, uint16_t Length _CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);\r
+\r
+                       /** FLASH buffer source version of \ref Endpoint_Write_Stream_LE.\r
+                        *\r
+                        *  \note The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.\r
+                        *\r
+                        *  \ingroup Group_EndpointStreamRW\r
+                        *\r
+                        *  \param[in] Buffer    Pointer to the source data buffer to read from.\r
+                        *  \param[in] Length    Number of bytes to read for the currently selected endpoint into the buffer.\r
+                        *  \param[in] Callback  Name of a callback routine to call between successive USB packet transfers, NULL if no callback\r
+                        *\r
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
+                        */\r
+                       uint8_t Endpoint_Write_PStream_LE(void* Buffer, uint16_t Length _CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);\r
 \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
                         *\r
                         *  \note This routine should not be used on CONTROL type endpoints.\r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointStreamRW\r
                         *\r
                         *  \param[in] Buffer    Pointer to the source data buffer to read from.\r
                         *  \param[in] Length    Number of bytes to read for the currently selected endpoint into the buffer.\r
                         *\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
-                                                        , StreamCallbackPtr_t Callback\r
-                       #endif\r
-                                                        ) ATTR_NON_NULL_PTR_ARG(1);\r
+                       uint8_t Endpoint_Write_Stream_BE(void* Buffer, uint16_t Length _CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);\r
+\r
+                       /** EEPROM buffer source version of \ref Endpoint_Write_Stream_BE.\r
+                        *\r
+                        *  \ingroup Group_EndpointStreamRW\r
+                        *\r
+                        *  \param[in] Buffer    Pointer to the source data buffer to read from.\r
+                        *  \param[in] Length    Number of bytes to read for the currently selected endpoint into the buffer.\r
+                        *  \param[in] Callback  Name of a callback routine to call between successive USB packet transfers, NULL if no callback\r
+                        *\r
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
+                        */\r
+                       uint8_t Endpoint_Write_EStream_BE(void* Buffer, uint16_t Length _CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);\r
+\r
+                       /** FLASH buffer source version of \ref Endpoint_Write_Stream_BE.\r
+                        *\r
+                        *  \note The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.\r
+                        *\r
+                        *  \ingroup Group_EndpointStreamRW\r
+                        *\r
+                        *  \param[in] Buffer    Pointer to the source data buffer to read from.\r
+                        *  \param[in] Length    Number of bytes to read for the currently selected endpoint into the buffer.\r
+                        *  \param[in] Callback  Name of a callback routine to call between successive USB packet transfers, NULL if no callback\r
+                        *\r
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
+                        */\r
+                       uint8_t Endpoint_Write_PStream_BE(void* Buffer, uint16_t Length _CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);\r
 \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
                         *\r
                         *  \note This routine should not be used on CONTROL type endpoints.\r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointStreamRW\r
                         *\r
-                        *  \param[out] Buffer    Pointer to the destination data buffer to write to.\r
+                        *  \param[out] Buffer   Pointer to the destination data buffer to write to.\r
                         *  \param[in] Length    Number of bytes to send via the currently selected endpoint.\r
                         *  \param[in] Callback  Name of a callback routine to call between successive USB packet transfers, NULL if no callback\r
                         *\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
-                                                       , StreamCallbackPtr_t Callback\r
-                       #endif\r
-                                                       ) ATTR_NON_NULL_PTR_ARG(1);\r
+                       uint8_t Endpoint_Read_Stream_LE(void* Buffer, uint16_t Length _CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);\r
 \r
+                       /** EEPROM buffer source version of \ref Endpoint_Read_Stream_LE.\r
+                        *\r
+                        *  \ingroup Group_EndpointStreamRW\r
+                        *\r
+                        *  \param[out] Buffer   Pointer to the destination data buffer to write to, located in EEPROM memory space.\r
+                        *  \param[in] Length    Number of bytes to send via the currently selected endpoint.\r
+                        *  \param[in] Callback  Name of a callback routine to call between successive USB packet transfers, NULL if no callback\r
+                        *\r
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
+                        */\r
+                       uint8_t Endpoint_Read_EStream_LE(void* Buffer, uint16_t Length _CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);\r
+                       \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
                         *\r
                         *  \note This routine should not be used on CONTROL type endpoints.\r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointStreamRW\r
                         *\r
                         *  \param[out] Buffer    Pointer to the destination data buffer to write to.\r
                         *  \param[in] Length    Number of bytes to send via the currently selected endpoint.\r
                         *\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
-                                                       , StreamCallbackPtr_t Callback\r
-                       #endif\r
-                                                       ) ATTR_NON_NULL_PTR_ARG(1);\r
+                       uint8_t Endpoint_Read_Stream_BE(void* Buffer, uint16_t Length _CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);\r
 \r
-                       #endif\r
+                       /** EEPROM buffer source version of \ref Endpoint_Read_Stream_BE.\r
+                        *\r
+                        *  \ingroup Group_EndpointStreamRW\r
+                        *\r
+                        *  \param[out] Buffer   Pointer to the destination data buffer to write to, located in EEPROM memory space.\r
+                        *  \param[in] Length    Number of bytes to send via the currently selected endpoint.\r
+                        *  \param[in] Callback  Name of a callback routine to call between successive USB packet transfers, NULL if no callback\r
+                        *\r
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
+                        */\r
+                       uint8_t Endpoint_Read_EStream_BE(void* Buffer, uint16_t Length _CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);\r
 \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
                         *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
                         *           together; i.e. the entire stream data must be read or written at the one time.\r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointStreamRW\r
                         *\r
                         *  \param[in] Buffer  Pointer to the source data buffer to read from.\r
                         *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.\r
                         *\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
+                       uint8_t Endpoint_Write_Control_Stream_LE(void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
+\r
+                       /** EEPROM buffer source version of Endpoint_Write_Control_Stream_LE.\r
+                        *\r
+                        *  \note This routine should only be used on CONTROL type endpoints.\r
+                        *\r
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
+                        *           together; i.e. the entire stream data must be read or written at the one time.\r
+                        *\r
+                        *  \ingroup Group_EndpointStreamRW\r
+                        *\r
+                        *  \param[in] Buffer  Pointer to the source data buffer to read from.\r
+                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.\r
+                        *\r
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
+                        */\r
+                       uint8_t Endpoint_Write_Control_EStream_LE(void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
+\r
+                       /** FLASH buffer source version of \ref Endpoint_Write_Control_Stream_LE.\r
+                        *\r
+                        *  \note The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.\r
+                        *\r
+                        *  \note This routine should only be used on CONTROL type endpoints.\r
+                        *\r
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
+                        *           together; i.e. the entire stream data must be read or written at the one time.\r
+                        *\r
+                        *  \ingroup Group_EndpointStreamRW\r
+                        *\r
+                        *  \param[in] Buffer  Pointer to the source data buffer to read from.\r
+                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.\r
+                        *\r
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
+                        */\r
+                       uint8_t Endpoint_Write_Control_PStream_LE(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
                         *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
                         *           together; i.e. the entire stream data must be read or written at the one time.\r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointStreamRW\r
                         *\r
                         *  \param[in] Buffer  Pointer to the source data buffer to read from.\r
                         *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.\r
                         *\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
+                       uint8_t Endpoint_Write_Control_Stream_BE(void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
+\r
+                       /** EEPROM buffer source version of \ref Endpoint_Write_Control_Stream_BE.\r
+                        *\r
+                        *  \note This routine should only be used on CONTROL type endpoints.\r
+                        *\r
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
+                        *           together; i.e. the entire stream data must be read or written at the one time.\r
+                        *\r
+                        *  \ingroup Group_EndpointStreamRW\r
+                        *\r
+                        *  \param[in] Buffer  Pointer to the source data buffer to read from.\r
+                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.\r
+                        *\r
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
+                        */\r
+                       uint8_t Endpoint_Write_Control_EStream_BE(void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
+\r
+                       /** FLASH buffer source version of \ref Endpoint_Write_Control_Stream_BE.\r
+                        *\r
+                        *  \note The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.\r
+                        *\r
+                        *  \note This routine should only be used on CONTROL type endpoints.\r
+                        *\r
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
+                        *           together; i.e. the entire stream data must be read or written at the one time.\r
+                        *\r
+                        *  \ingroup Group_EndpointStreamRW\r
+                        *\r
+                        *  \param[in] Buffer  Pointer to the source data buffer to read from.\r
+                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.\r
+                        *\r
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
+                        */\r
+                       uint8_t Endpoint_Write_Control_PStream_BE(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
                         *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
                         *           together; i.e. the entire stream data must be read or written at the one time.\r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointStreamRW\r
                         *\r
                         *  \param[out] Buffer  Pointer to the destination data buffer to write to.\r
                         *  \param[in] Length  Number of bytes to send via the currently selected endpoint.\r
                         */\r
                        uint8_t Endpoint_Read_Control_Stream_LE(void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
 \r
+                       /** EEPROM buffer source version of \ref Endpoint_Read_Control_Stream_LE.\r
+                        *\r
+                        *  \note This routine should only be used on CONTROL type endpoints.\r
+                        *\r
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
+                        *           together; i.e. the entire stream data must be read or written at the one time.\r
+                        *\r
+                        *  \ingroup Group_EndpointStreamRW\r
+                        *\r
+                        *  \param[out] Buffer  Pointer to the destination data buffer to write to.\r
+                        *  \param[in] Length  Number of bytes to send via the currently selected endpoint.\r
+                        *\r
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
+                        */\r
+                       uint8_t Endpoint_Read_Control_EStream_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
                         *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
                         *           together; i.e. the entire stream data must be read or written at the one time.\r
                         *\r
-                        *  \ingroup Group_EndpointRW\r
+                        *  \ingroup Group_EndpointStreamRW\r
                         *\r
                         *  \param[out] Buffer  Pointer to the destination data buffer to write to.\r
                         *  \param[in] Length  Number of bytes to send via the currently selected endpoint.\r
                         */\r
                        uint8_t Endpoint_Read_Control_Stream_BE(void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);                \r
                        \r
+                       /** EEPROM buffer source version of \ref Endpoint_Read_Control_Stream_BE.\r
+                        *\r
+                        *  \note This routine should only be used on CONTROL type endpoints.\r
+                        *\r
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
+                        *           together; i.e. the entire stream data must be read or written at the one time.\r
+                        *\r
+                        *  \ingroup Group_EndpointStreamRW\r
+                        *\r
+                        *  \param[out] Buffer  Pointer to the destination data buffer to write to.\r
+                        *  \param[in] Length  Number of bytes to send via the currently selected endpoint.\r
+                        *\r
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
+                        */\r
+                       uint8_t Endpoint_Read_Control_EStream_BE(void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);               \r
+\r
        /* Private Interface - For use in library only: */\r
        #if !defined(__DOXYGEN__)\r
                /* Macros: */\r