Fix broken XMEGA USB support.
[pub/USBasp.git] / LUFA / Drivers / USB / Core / XMEGA / USBController_XMEGA.h
index 84966ad..2198b53 100644 (file)
 
        /* Private Interface - For use in library only: */
        #if !defined(__DOXYGEN__)
+               /* Macros: */
+                       #if defined(MAX_ENDPOINT_INDEX)
+                               #define ENDPOINT_TABLE_COUNT  (MAX_ENDPOINT_INDEX + 1)
+                       #else
+                               #define ENDPOINT_TABLE_COUNT  16
+                       #endif
+
                /* Type Defines: */
                        typedef struct
                        {
@@ -64,7 +71,7 @@
                                {
                                        USB_EP_t OUT;
                                        USB_EP_t IN;
-                               } Endpoints[16];
+                               } Endpoints[ENDPOINT_TABLE_COUNT];
                                uint16_t FrameNum;
                        } ATTR_PACKED USB_EndpointTable_t;