Add support for triple endpoint/pipe bank AVR32 UC3 devices.
authorDean Camera <dean@fourwalledcubicle.com>
Thu, 14 Jul 2011 05:38:32 +0000 (05:38 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Thu, 14 Jul 2011 05:38:32 +0000 (05:38 +0000)
LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h
LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
LUFA/Drivers/USB/Core/UC3/USBController_UC3.h

index a5870f8..8456662 100644 (file)
                                #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
+                               #define ENDPOINT_DETAILS_EP6                   512, 2\r
                                #define ENDPOINT_DETAILS_EP7                   512, 2\r
                        #elif defined(USB_SERIES_UC3B0_AVR32) || defined(USB_SERIES_UC3B1_AVR32) \r
                                #define ENDPOINT_DETAILS_MAXEP                 7\r
                         *  accesses the second bank.\r
                         */\r
                        #define ENDPOINT_BANK_DOUBLE                    AVR32_USBB_UECFG0_EPBK_DOUBLE\r
+\r
+                       #if defined(USB_SERIES_UC3A3_AVR32) || defined(USB_SERIES_UC3A4_AVR32) || defined(__DOXYGEN__)\r
+                               /** Mask for the bank mode selection for the \ref Endpoint_ConfigureEndpoint() macro. This indicates\r
+                                *  that the endpoint should have three 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 remaining banks.\r
+                                *\r
+                                *  \note Not available on all AVR models.\r
+                                */\r
+                               #define ENDPOINT_BANK_TRIPLE                AVR32_USBB_UECFG0_EPBK_TRIPLE\r
+                       #endif\r
                        //@}\r
 \r
                        #if (!defined(FIXED_CONTROL_ENDPOINT_SIZE) || defined(__DOXYGEN__))\r
index ae8f036..25a4586 100644 (file)
                         *  bank.\r
                         */\r
                        #define PIPE_BANK_DOUBLE                AVR32_USBB_UPCFG0_PBK_DOUBLE\r
+\r
+                       #if defined(USB_SERIES_UC3A3_AVR32) || defined(USB_SERIES_UC3A4_AVR32) || defined(__DOXYGEN__)\r
+                               /** Mask for the bank mode selection for the \ref Pipe_ConfigurePipe() macro. This indicates that the\r
+                                *  pipe should have three banks, which requires more USB FIFO memory but results in faster transfers\r
+                                *  as one USB device (the AVR or the attached device) can access one bank while the other accesses the\r
+                                *  remaining banks.\r
+                                *\r
+                                *  \note Not available on all AVR models.\r
+                                */\r
+                               #define PIPE_BANK_TRIPLE           AVR32_USBB_UPCFG0_PBK_TRIPLE\r
+                       #endif\r
                        //@}\r
 \r
                        /** Default size of the default control pipe's bank, until altered by the Endpoint0Size value\r
index 0bad549..c2f85b8 100644 (file)
        /* Private Interface - For use in library only: */\r
        #if !defined(__DOXYGEN__)\r
                /* Macros: */                   \r
-                       #if (defined(USB_SERIES_UC3A3_AVR32) || defined(USB_SERIES_UC3A4_AVR32))\r
+                       #if defined(USB_SERIES_UC3A3_AVR32) || defined(USB_SERIES_UC3A4_AVR32)\r
                                #define USB_CLOCK_REQUIRED_FREQ  12000000UL\r
                        #else\r
                                #define USB_CLOCK_REQUIRED_FREQ  48000000UL\r