aboutsummaryrefslogtreecommitdiff
path: root/LUFA/Drivers/USB/Core
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-03-14 00:03:30 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-03-14 00:03:30 +0000
commit59a2f69ce08f3f913c0233f0590f01825b7edfc2 (patch)
tree7fd467ce9aac9436c41a58ebae47aa867b762726 /LUFA/Drivers/USB/Core
parent126dc0d30b08727856fb67744832f1d8e03e458b (diff)
Correct Endpoint/Pipe maximum constants for the AVR32 UC3 models.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1709 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'LUFA/Drivers/USB/Core')
-rw-r--r--LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h40
-rw-r--r--LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h12
2 files changed, 39 insertions, 13 deletions
diff --git a/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h b/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h
index 38f68834..4a2cd675 100644
--- a/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h
+++ b/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h
@@ -98,15 +98,37 @@
#define _ENDPOINT_GET_BANKS2(EPDetails) _ENDPOINT_GET_BANKS3(EPDetails)
#define _ENDPOINT_GET_BANKS3(MaxSize, Banks) (Banks)
- #define ENDPOINT_DETAILS_MAXEP 7
-
- #define ENDPOINT_DETAILS_EP0 64, 1
- #define ENDPOINT_DETAILS_EP1 64, 2
- #define ENDPOINT_DETAILS_EP2 64, 2
- #define ENDPOINT_DETAILS_EP3 64, 2
- #define ENDPOINT_DETAILS_EP4 64, 2
- #define ENDPOINT_DETAILS_EP5 256, 2
- #define ENDPOINT_DETAILS_EP6 256, 2
+ #if defined(USB_SERIES_UC3A0_AVR) || defined(USB_SERIES_UC3A1_AVR)
+ #define ENDPOINT_DETAILS_MAXEP 7
+
+ #define ENDPOINT_DETAILS_EP0 64, 1
+ #define ENDPOINT_DETAILS_EP1 256, 2
+ #define ENDPOINT_DETAILS_EP2 256, 2
+ #define ENDPOINT_DETAILS_EP3 64, 2
+ #define ENDPOINT_DETAILS_EP4 64, 2
+ #define ENDPOINT_DETAILS_EP5 256, 2
+ #define ENDPOINT_DETAILS_EP6 256, 2
+ #elif defined(USB_SERIES_UC3A3_AVR) || defined(USB_SERIES_UC3A4_AVR)
+ #define ENDPOINT_DETAILS_MAXEP 8
+
+ #define ENDPOINT_DETAILS_EP0 64, 1
+ #define ENDPOINT_DETAILS_EP1 512, 2
+ #define ENDPOINT_DETAILS_EP2 512, 2
+ #define ENDPOINT_DETAILS_EP3 512, 2
+ #define ENDPOINT_DETAILS_EP4 512, 2
+ #define ENDPOINT_DETAILS_EP5 512, 2
+ #define ENDPOINT_DETAILS_EP6 512, 2
+ #elif defined(USB_SERIES_UC3B0_AVR) || defined(USB_SERIES_UC3B1_AVR)
+ #define ENDPOINT_DETAILS_MAXEP 7
+
+ #define ENDPOINT_DETAILS_EP0 64, 1
+ #define ENDPOINT_DETAILS_EP1 64, 2
+ #define ENDPOINT_DETAILS_EP2 64, 2
+ #define ENDPOINT_DETAILS_EP3 64, 2
+ #define ENDPOINT_DETAILS_EP4 64, 2
+ #define ENDPOINT_DETAILS_EP5 256, 2
+ #define ENDPOINT_DETAILS_EP6 256, 2
+ #endif
/* Inline Functions: */
static inline uint32_t Endpoint_BytesToEPSizeMask(const uint16_t Bytes) ATTR_WARN_UNUSED_RESULT ATTR_CONST
diff --git a/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h b/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
index 204169f0..10d44345 100644
--- a/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
+++ b/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
@@ -172,10 +172,14 @@
*/
#define PIPE_CONTROLPIPE_DEFAULT_SIZE 64
- /** Total number of pipes (including the default control pipe at address 0) which may be used in
- * the device.
- */
- #define PIPE_TOTAL_PIPES 7
+ #if defined(USB_SERIES_UC3A3_AVR) || defined(USB_SERIES_UC3A4_AVR) || defined(__DOXYGEN__)
+ /** Total number of pipes (including the default control pipe at address 0) which may be used in
+ * the device.
+ */
+ #define PIPE_TOTAL_PIPES 8
+ #else
+ #define PIPE_TOTAL_PIPES 7
+ #endif
/** Size in bytes of the largest pipe bank size possible in the device. Not all banks on each AVR
* model supports the largest bank size possible on the device; different pipe numbers support