Correct Endpoint/Pipe maximum constants for the AVR32 UC3 models.
authorDean Camera <dean@fourwalledcubicle.com>
Mon, 14 Mar 2011 00:03:30 +0000 (00:03 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Mon, 14 Mar 2011 00:03:30 +0000 (00:03 +0000)
LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h
LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h

index 38f6883..4a2cd67 100644 (file)
                        #define _ENDPOINT_GET_BANKS2(EPDetails)        _ENDPOINT_GET_BANKS3(EPDetails)\r
                        #define _ENDPOINT_GET_BANKS3(MaxSize, Banks)   (Banks)\r
 \r
                        #define _ENDPOINT_GET_BANKS2(EPDetails)        _ENDPOINT_GET_BANKS3(EPDetails)\r
                        #define _ENDPOINT_GET_BANKS3(MaxSize, Banks)   (Banks)\r
 \r
-                       #define ENDPOINT_DETAILS_MAXEP                 7\r
-\r
-                       #define ENDPOINT_DETAILS_EP0                   64,  1\r
-                       #define ENDPOINT_DETAILS_EP1                   64,  2\r
-                       #define ENDPOINT_DETAILS_EP2                   64,  2\r
-                       #define ENDPOINT_DETAILS_EP3                   64,  2\r
-                       #define ENDPOINT_DETAILS_EP4                   64,  2\r
-                       #define ENDPOINT_DETAILS_EP5                   256, 2\r
-                       #define ENDPOINT_DETAILS_EP6                   256, 2\r
+                       #if defined(USB_SERIES_UC3A0_AVR) || defined(USB_SERIES_UC3A1_AVR)\r
+                               #define ENDPOINT_DETAILS_MAXEP                 7\r
+\r
+                               #define ENDPOINT_DETAILS_EP0                   64,  1\r
+                               #define ENDPOINT_DETAILS_EP1                   256, 2\r
+                               #define ENDPOINT_DETAILS_EP2                   256, 2\r
+                               #define ENDPOINT_DETAILS_EP3                   64,  2\r
+                               #define ENDPOINT_DETAILS_EP4                   64,  2\r
+                               #define ENDPOINT_DETAILS_EP5                   256, 2\r
+                               #define ENDPOINT_DETAILS_EP6                   256, 2\r
+                       #elif defined(USB_SERIES_UC3A3_AVR) || defined(USB_SERIES_UC3A4_AVR)\r
+                               #define ENDPOINT_DETAILS_MAXEP                 8\r
+\r
+                               #define ENDPOINT_DETAILS_EP0                   64,  1\r
+                               #define ENDPOINT_DETAILS_EP1                   512, 2\r
+                               #define ENDPOINT_DETAILS_EP2                   512, 2\r
+                               #define ENDPOINT_DETAILS_EP3                   512, 2\r
+                               #define ENDPOINT_DETAILS_EP4                   512, 2\r
+                               #define ENDPOINT_DETAILS_EP5                   512, 2\r
+                               #define ENDPOINT_DETAILS_EP6                   512, 2                   \r
+                       #elif defined(USB_SERIES_UC3B0_AVR) || defined(USB_SERIES_UC3B1_AVR) \r
+                               #define ENDPOINT_DETAILS_MAXEP                 7\r
+\r
+                               #define ENDPOINT_DETAILS_EP0                   64,  1\r
+                               #define ENDPOINT_DETAILS_EP1                   64,  2\r
+                               #define ENDPOINT_DETAILS_EP2                   64,  2\r
+                               #define ENDPOINT_DETAILS_EP3                   64,  2\r
+                               #define ENDPOINT_DETAILS_EP4                   64,  2\r
+                               #define ENDPOINT_DETAILS_EP5                   256, 2\r
+                               #define ENDPOINT_DETAILS_EP6                   256, 2                   \r
+                       #endif\r
 \r
                /* Inline Functions: */\r
                        static inline uint32_t Endpoint_BytesToEPSizeMask(const uint16_t Bytes) ATTR_WARN_UNUSED_RESULT ATTR_CONST\r
 \r
                /* Inline Functions: */\r
                        static inline uint32_t Endpoint_BytesToEPSizeMask(const uint16_t Bytes) ATTR_WARN_UNUSED_RESULT ATTR_CONST\r
index 204169f..10d4434 100644 (file)
                         */\r
                        #define PIPE_CONTROLPIPE_DEFAULT_SIZE   64\r
 \r
                         */\r
                        #define PIPE_CONTROLPIPE_DEFAULT_SIZE   64\r
 \r
-                       /** Total number of pipes (including the default control pipe at address 0) which may be used in\r
-                        *  the device.\r
-                        */\r
-                       #define PIPE_TOTAL_PIPES                7\r
+                       #if defined(USB_SERIES_UC3A3_AVR) || defined(USB_SERIES_UC3A4_AVR) || defined(__DOXYGEN__)\r
+                               /** Total number of pipes (including the default control pipe at address 0) which may be used in\r
+                                *  the device.\r
+                                */\r
+                               #define PIPE_TOTAL_PIPES            8\r
+                       #else\r
+                               #define PIPE_TOTAL_PIPES            7                   \r
+                       #endif\r
 \r
                        /** Size in bytes of the largest pipe bank size possible in the device. Not all banks on each AVR\r
                         *  model supports the largest bank size possible on the device; different pipe numbers support\r
 \r
                        /** Size in bytes of the largest pipe bank size possible in the device. Not all banks on each AVR\r
                         *  model supports the largest bank size possible on the device; different pipe numbers support\r