Add double banking property to LUFA powered projects in the Projects directory. Add guards to macro parameters to ensure that formulas passed as parameters don't mess up the internal macro structure.

This commit is contained in:
Dean Camera 2009-11-06 14:32:01 +00:00
parent f7ab433c67
commit f29fc1abc4
13 changed files with 60 additions and 48 deletions

View file

@ -68,12 +68,12 @@
/** Macro for calculating the baud value from a given baud rate when the U2X (double speed) bit is
* not set.
*/
#define SERIAL_UBBRVAL(baud) (((F_CPU / 16) / baud) - 1)
#define SERIAL_UBBRVAL(baud) (((F_CPU / 16) / (baud)) - 1)
/** Macro for calculating the baud value from a given baud rate when the U2X (double speed) bit is
* set.
*/
#define SERIAL_2X_UBBRVAL(baud) (((F_CPU / 8) / baud) - 1)
#define SERIAL_2X_UBBRVAL(baud) (((F_CPU / 8) / (baud)) - 1)
/* Pseudo-Function Macros: */
#if defined(__DOXYGEN__)