*/\r
\r
/** \file\r
- * \brief Common USB Endpoint definitions for all architectures.\r
+ * \brief USB Endpoint definitions for all architectures.\r
* \copydetails Group_EndpointManagement\r
*\r
* \note This file should not be included directly. It is automatically included as needed by the USB driver\r
\r
/** \ingroup Group_EndpointManagement\r
* \defgroup Group_EndpointRW Endpoint Data Reading and Writing\r
- * \brief Common USB Endpoint definitions for all architectures.\r
+ * \brief Endpoint data read/write definitions.\r
*\r
* 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
+ * \brief Endpoint data primitive read/write definitions.\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
/** \ingroup Group_EndpointManagement\r
* \defgroup Group_EndpointPacketManagement Endpoint Packet Management\r
+ * \brief USB Endpoint package management definitions.\r
*\r
* Functions, macros, variables, enums and types related to packet management of endpoints.\r
*/\r
\r
/** \ingroup Group_USB\r
* \defgroup Group_EndpointManagement Endpoint Management\r
+ * \brief Endpoint management definitions.\r
*\r
* Functions, macros and enums related to endpoint management when in USB Device mode. This\r
* module contains the endpoint management macros, as well as endpoint interrupt and data\r
\r
/* Includes: */\r
#include "../../../Common/Common.h"\r
+ #include "USBMode.h" \r
\r
- #if (ARCH == ARCH_AVR8)\r
- #include "AVR8/Endpoint.h"\r
+ /* Enable C linkage for C++ Compilers: */\r
+ #if defined(__cplusplus)\r
+ extern "C" {\r
#endif\r
\r
/* Preprocessor Checks: */\r
#error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
#endif\r
\r
+ /* Public Interface - May be used in end-application: */\r
+ /* Macros: */\r
+ /** Endpoint number mask, for masking against endpoint addresses to retrieve the endpoint's\r
+ * numerical address in the device.\r
+ */\r
+ #define ENDPOINT_EPNUM_MASK 0x07\r
+\r
+ /** Endpoint direction mask, for masking against endpoint addresses to retrieve the endpoint's\r
+ * direction for comparing with the \c ENDPOINT_DESCRIPTOR_DIR_* masks.\r
+ */\r
+ #define ENDPOINT_EPDIR_MASK 0x80\r
+\r
+ /** Endpoint address for the default control endpoint, which always resides in address 0. This is\r
+ * defined for convenience to give more readable code when used with the endpoint macros.\r
+ */\r
+ #define ENDPOINT_CONTROLEP 0\r
+\r
+ /* Architecture Includes: */\r
+ #if (ARCH == ARCH_AVR8)\r
+ #include "AVR8/Endpoint_AVR8.h"\r
+ #elif (ARCH == ARCH_UC3)\r
+ #include "UC3/Endpoint_UC3.h"\r
+ #elif (ARCH == ARCH_XMEGA)\r
+ #include "XMEGA/Endpoint_XMEGA.h"\r
+ #endif\r
+\r
+ /* Disable C linkage for C++ Compilers: */\r
+ #if defined(__cplusplus)\r
+ }\r
+ #endif\r
+\r
#endif\r
\r
/** @} */\r