aboutsummaryrefslogtreecommitdiff
path: root/LUFA/Drivers
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2012-06-10 13:09:39 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2012-06-10 13:09:39 +0000
commit24aa788bdaf7ef6faa5502ac3023b1a81de41111 (patch)
treeb81e22cce8d87b236ec0e9bed5f9d4047af8c43e /LUFA/Drivers
parent4cc6e8c2f9d849539d82e08d1717a693bf1590c0 (diff)
Add MAX_ENDPOINT_INDEX compile time option for the XMEGA devices.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@2327 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'LUFA/Drivers')
-rw-r--r--LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h b/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h
index 23de8fc0..8be20d2d 100644
--- a/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h
+++ b/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h
@@ -90,14 +90,18 @@
/* Public Interface - May be used in end-application: */
/* Macros: */
- #if !defined(CONTROL_ONLY_DEVICE) || defined(__DOXYGEN__)
+ #if (!defined(MAX_ENDPOINT_INDEX) && !defined(CONTROL_ONLY_DEVICE)) || defined(__DOXYGEN__)
/** Total number of endpoints (including the default control endpoint at address 0) which may
* be used in the device. Different USB AVR models support different amounts of endpoints,
* this value reflects the maximum number of endpoints for the currently selected AVR model.
*/
#define ENDPOINT_TOTAL_ENDPOINTS 16
#else
- #define ENDPOINT_TOTAL_ENDPOINTS 1
+ #if defined(CONTROL_ONLY_DEVICE)
+ #define ENDPOINT_TOTAL_ENDPOINTS 1
+ #else
+ #define ENDPOINT_TOTAL_ENDPOINTS (MAX_ENDPOINT_INDEX + 1)
+ #endif
#endif
/* Private Interface - For use in library only: */