\r
#define ENDPOINT_DETAILS_MAXEP 16\r
\r
+ /* Inline Functions: */\r
+ static inline uint8_t Endpoint_BytesToEPSizeMask(const uint16_t Bytes) ATTR_WARN_UNUSED_RESULT ATTR_CONST\r
+ ATTR_ALWAYS_INLINE;\r
+ static inline uint8_t Endpoint_BytesToEPSizeMask(const uint16_t Bytes)\r
+ {\r
+ uint8_t MaskVal = 0;\r
+ uint16_t CheckBytes = 8;\r
+\r
+ while (CheckBytes < Bytes)\r
+ {\r
+ MaskVal++;\r
+ CheckBytes <<= 1;\r
+ }\r
+\r
+ return (MaskVal << USB_EP_SIZE_gp);\r
+ }\r
+\r
/* Function Prototypes: */\r
void Endpoint_ClearEndpoints(void);\r
bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number,\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 // TODO\r
+ #define ENDPOINT_DIR_OUT false\r
\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 0 // TODO\r
+ #define ENDPOINT_DIR_IN true\r
//@}\r
\r
/** \name Endpoint Bank Mode Masks */\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 // TODO\r
+ #define ENDPOINT_BANK_SINGLE 0\r
\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
*/\r
- #define ENDPOINT_BANK_DOUBLE 0 // TODO\r
+ #define ENDPOINT_BANK_DOUBLE USB_EP_BANK_bm\r
//@}\r
\r
#if (!defined(FIXED_CONTROL_ENDPOINT_SIZE) || defined(__DOXYGEN__))\r