projects
/
pub
/
USBasp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
67a8f54
)
Add MAX_ENDPOINT_INDEX compile time option for the XMEGA devices.
author
Dean Camera
<dean@fourwalledcubicle.com>
Sun, 10 Jun 2012 13:09:39 +0000
(13:09 +0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Sun, 10 Jun 2012 13:09:39 +0000
(13:09 +0000)
LUFA/CodeTemplates/LUFAConfig.h
patch
|
blob
|
blame
|
history
LUFA/DoxygenPages/CompileTimeTokens.txt
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h
patch
|
blob
|
blame
|
history
diff --git
a/LUFA/CodeTemplates/LUFAConfig.h
b/LUFA/CodeTemplates/LUFAConfig.h
index
0c9dca3
..
06882dc
100644
(file)
--- a/
LUFA/CodeTemplates/LUFAConfig.h
+++ b/
LUFA/CodeTemplates/LUFAConfig.h
@@
-117,6
+117,7
@@
// #define DEVICE_STATE_AS_GPIOR {Insert Value Here}
// #define FIXED_NUM_CONFIGURATIONS {Insert Value Here}
// #define CONTROL_ONLY_DEVICE
// #define DEVICE_STATE_AS_GPIOR {Insert Value Here}
// #define FIXED_NUM_CONFIGURATIONS {Insert Value Here}
// #define CONTROL_ONLY_DEVICE
+// #define MAX_ENDPOINT_INDEX {Insert Value Here}
// #define NO_DEVICE_REMOTE_WAKEUP
// #define NO_DEVICE_SELF_POWER
// #define NO_DEVICE_REMOTE_WAKEUP
// #define NO_DEVICE_SELF_POWER
diff --git
a/LUFA/DoxygenPages/CompileTimeTokens.txt
b/LUFA/DoxygenPages/CompileTimeTokens.txt
index
8c348dd
..
79c4cd4
100644
(file)
--- a/
LUFA/DoxygenPages/CompileTimeTokens.txt
+++ b/
LUFA/DoxygenPages/CompileTimeTokens.txt
@@
-168,6
+168,10
@@
* is through control endpoint requests. Defining this token will remove several features related to the selection and control of device
* endpoints internally, saving space. Generally, this is usually only useful in (some) bootloaders and is best avoided.
*
* is through control endpoint requests. Defining this token will remove several features related to the selection and control of device
* endpoints internally, saving space. Generally, this is usually only useful in (some) bootloaders and is best avoided.
*
+ * - <b>MAX_ENDPOINT_INDEX</b> - (\ref Group_Device) - <i>XMEGA Only</i> \n
+ * Defining this value to the highest index (not address - this excludes the direction flag) endpoint within the device will restrict the
+ * number of FIFOs created internally for the endpoint buffers, reducing the total RAM usage.
+ *
* - <b>INTERRUPT_CONTROL_ENDPOINT</b> - (\ref Group_USBManagement) - <i>All Architectures</i> \n
* Some applications prefer to not call the USB_USBTask() management task regularly while in device mode, as it can complicate code significantly.
* Instead, when device mode is used this token can be passed to the library via the -D switch to allow the library to manage the USB control
* - <b>INTERRUPT_CONTROL_ENDPOINT</b> - (\ref Group_USBManagement) - <i>All Architectures</i> \n
* Some applications prefer to not call the USB_USBTask() management task regularly while in device mode, as it can complicate code significantly.
* Instead, when device mode is used this token can be passed to the library via the -D switch to allow the library to manage the USB control
diff --git
a/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h
b/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h
index
23de8fc
..
8be20d2
100644
(file)
--- 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: */
/* 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
/** 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: */
#endif
/* Private Interface - For use in library only: */