diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-11-06 14:32:01 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-11-06 14:32:01 +0000 |
commit | f29fc1abc40dd862689ca8765e244c1212742744 (patch) | |
tree | c415237396cc2bfdb7d63401ae5a3c6fb2ea2a0d /LUFA/Drivers/Peripheral | |
parent | f7ab433c67b86723385ec05ee9c7b96dd18e6dde (diff) | |
download | lufa-f29fc1abc40dd862689ca8765e244c1212742744.tar.gz lufa-f29fc1abc40dd862689ca8765e244c1212742744.tar.bz2 lufa-f29fc1abc40dd862689ca8765e244c1212742744.zip |
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.
Diffstat (limited to 'LUFA/Drivers/Peripheral')
-rw-r--r-- | LUFA/Drivers/Peripheral/Serial.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/LUFA/Drivers/Peripheral/Serial.h b/LUFA/Drivers/Peripheral/Serial.h index bde1449e8..4009331bd 100644 --- a/LUFA/Drivers/Peripheral/Serial.h +++ b/LUFA/Drivers/Peripheral/Serial.h @@ -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__)
|