projects
/
pub
/
USBasp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
70d55f6
)
Added new ADC_GET_CHANNEL_MASK() convenience macro to the ADC driver.
author
Dean Camera
<dean@fourwalledcubicle.com>
Sun, 16 Jan 2011 16:13:22 +0000
(16:13 +0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Sun, 16 Jan 2011 16:13:22 +0000
(16:13 +0000)
LUFA/Drivers/Peripheral/AVRU4U6U7/ADC.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/LowLevel/Endpoint.h
patch
|
blob
|
blame
|
history
LUFA/ManPages/ChangeLog.txt
patch
|
blob
|
blame
|
history
Projects/AVRISP-MKII/Lib/V2Protocol.h
patch
|
blob
|
blame
|
history
diff --git
a/LUFA/Drivers/Peripheral/AVRU4U6U7/ADC.h
b/LUFA/Drivers/Peripheral/AVRU4U6U7/ADC.h
index
9d6e91b
..
5f4b034
100644
(file)
--- a/
LUFA/Drivers/Peripheral/AVRU4U6U7/ADC.h
+++ b/
LUFA/Drivers/Peripheral/AVRU4U6U7/ADC.h
@@
-90,6
+90,13
@@
#error Do not include this file directly. Include LUFA/Drivers/Peripheral/ADC.h instead.
#endif
#error Do not include this file directly. Include LUFA/Drivers/Peripheral/ADC.h instead.
#endif
+ /* Private Interface - For use in library only: */
+ #if !defined(__DOXYGEN__)
+ /* Macros: */
+ #define _ADC_GET_MUX_MASK2(y) ADC_CHANNEL ## y
+ #define _ADC_GET_MUX_MASK(y) _ADC_GET_MUX_MASK2(y)
+ #endif
+
/* Public Interface - May be used in end-application: */
/* Macros: */
/** \name ADC Reference Configuration Masks */
/* Public Interface - May be used in end-application: */
/* Macros: */
/** \name ADC Reference Configuration Masks */
@@
-235,6
+242,15
@@
*/
#define ADC_INT_TEMP_SENS ((1 << 8) | (0x07 << MUX0))
#endif
*/
#define ADC_INT_TEMP_SENS ((1 << 8) | (0x07 << MUX0))
#endif
+
+ /** Retrieves the ADC MUX mask for the given ADC channel number.
+ *
+ * \note This macro will only work correctly on channel numbers that are compile-time
+ * constants defined by the preprocessor.
+ *
+ * \param[in] Channel Index of the ADC channel whose MUX mask is to be retrieved.
+ */
+ #define ADC_GET_CHANNEL_MASK(Channel) _ADC_GET_MUX_MASK(Channel)
//@}
/* Inline Functions: */
//@}
/* Inline Functions: */
diff --git
a/LUFA/Drivers/USB/LowLevel/Endpoint.h
b/LUFA/Drivers/USB/LowLevel/Endpoint.h
index
24c61a6
..
9ce1380
100644
(file)
--- a/
LUFA/Drivers/USB/LowLevel/Endpoint.h
+++ b/
LUFA/Drivers/USB/LowLevel/Endpoint.h
@@
-203,13
+203,19
@@
*/
#define ENDPOINT_EPSIZE_MASK 0x7F
*/
#define ENDPOINT_EPSIZE_MASK 0x7F
- /** Maximum size in bytes of a given endpoint.
+ /** Retrives the maximum bank size in bytes of a given endpoint.
+ *
+ * \note This macro will only work correctly on endpoint indexes that are compile-time constants
+ * defined by the preprocessor.
*
* \param[in] EPIndex Endpoint number, a value between 0 and (\ref ENDPOINT_TOTAL_ENDPOINTS - 1)
*/
#define ENDPOINT_MAX_SIZE(EPIndex) _ENDPOINT_GET_MAXSIZE(EPIndex)
*
* \param[in] EPIndex Endpoint number, a value between 0 and (\ref ENDPOINT_TOTAL_ENDPOINTS - 1)
*/
#define ENDPOINT_MAX_SIZE(EPIndex) _ENDPOINT_GET_MAXSIZE(EPIndex)
- /** Indicates the total number of banks supported by the given endpoint.
+ /** Retrieves the total number of banks supported by the given endpoint.
+ *
+ * \note This macro will only work correctly on endpoint indexes that are compile-time constants
+ * defined by the preprocessor.
*
* \param[in] EPIndex Endpoint number, a value between 0 and (\ref ENDPOINT_TOTAL_ENDPOINTS - 1)
*/
*
* \param[in] EPIndex Endpoint number, a value between 0 and (\ref ENDPOINT_TOTAL_ENDPOINTS - 1)
*/
diff --git
a/LUFA/ManPages/ChangeLog.txt
b/LUFA/ManPages/ChangeLog.txt
index
edf354c
..
26b3a9a
100644
(file)
--- a/
LUFA/ManPages/ChangeLog.txt
+++ b/
LUFA/ManPages/ChangeLog.txt
@@
-16,6
+16,7
@@
* - Added new GCC_FORCE_POINTER_ACCESS() macro to correct GCC's mishandling of struct pointer accesses
* - Added basic driver example use code to the library documentation
* - Added new Endpoint_Null_Stream() and Pipe_Null_stream() functions
* - Added new GCC_FORCE_POINTER_ACCESS() macro to correct GCC's mishandling of struct pointer accesses
* - Added basic driver example use code to the library documentation
* - Added new Endpoint_Null_Stream() and Pipe_Null_stream() functions
+ * - Added new ADC_GET_CHANNEL_MASK() convenience macro
* - Library Applications:
* - Added ability to write protect Mass Storage disk write operations from the host OS
*
* - Library Applications:
* - Added ability to write protect Mass Storage disk write operations from the host OS
*
diff --git
a/Projects/AVRISP-MKII/Lib/V2Protocol.h
b/Projects/AVRISP-MKII/Lib/V2Protocol.h
index
4f5950b
..
ed42de9
100644
(file)
--- a/
Projects/AVRISP-MKII/Lib/V2Protocol.h
+++ b/
Projects/AVRISP-MKII/Lib/V2Protocol.h
@@
-62,11
+62,6
@@
#endif
/* Macros: */
#endif
/* Macros: */
- #if !defined(__DOXYGEN__)
- #define _GETADCMUXMASK2(x, y) x ## y
- #define _GETADCMUXMASK(x, y) _GETADCMUXMASK2(x, y)
- #endif
-
/** Programmer ID string, returned to the host during the CMD_SIGN_ON command processing. */
#define PROGRAMMER_ID "AVRISP_MK2"
/** Programmer ID string, returned to the host during the CMD_SIGN_ON command processing. */
#define PROGRAMMER_ID "AVRISP_MK2"
@@
-77,7
+72,7
@@
#define TimeoutTicksRemaining GPIOR1
/** MUX mask for the VTARGET ADC channel number. */
#define TimeoutTicksRemaining GPIOR1
/** MUX mask for the VTARGET ADC channel number. */
- #define VTARGET_ADC_CHANNEL_MASK
_GETADCMUXMASK(ADC_CHANNEL,
VTARGET_ADC_CHANNEL)
+ #define VTARGET_ADC_CHANNEL_MASK
ADC_GET_CHANNEL_MASK(
VTARGET_ADC_CHANNEL)
/* External Variables: */
extern uint32_t CurrentAddress;
/* External Variables: */
extern uint32_t CurrentAddress;