aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-09-02 04:38:56 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-09-02 04:38:56 +0000
commit413438eb2330e8b2d9606a2936a169c9dd7916de (patch)
tree05f869f3772a849ee4c1326164a46bfa08750382 /LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.h
parent88d022a75245e7492ecd11a5e1ea5c553acf0b2c (diff)
downloadlufa-413438eb2330e8b2d9606a2936a169c9dd7916de.tar.gz
lufa-413438eb2330e8b2d9606a2936a169c9dd7916de.tar.bz2
lufa-413438eb2330e8b2d9606a2936a169c9dd7916de.zip
Add new TWI_BITLENGTH_FROM_FREQ() macro to the AVR8 TWI peripheral driver.
Change Delay_MS() to accept a 16-bit parameter rather than an 8-bit parameter for longer possible delays. Minor documentation improvements.
Diffstat (limited to 'LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.h')
-rw-r--r--LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.h b/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.h
index d8216cd24..639b3c3b4 100644
--- a/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.h
+++ b/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.h
@@ -97,15 +97,23 @@
/* Public Interface - May be used in end-application: */
/* Macros: */
- /** Macro for calculating the baud value from a given baud rate when the U2X (double speed) bit is
+ /** Macro for calculating the baud value from a given baud rate when the \c U2X (double speed) bit is
* not set.
+ *
+ * \param[in] Baud Target serial UART baud rate.
+ *
+ * \return Closest UBRR register value for the given UART frequency.
*/
- #define SERIAL_UBBRVAL(baud) ((((F_CPU / 16) + (baud / 2)) / (baud)) - 1)
+ #define SERIAL_UBBRVAL(Baud) ((((F_CPU / 16) + (Baud / 2)) / (Baud)) - 1)
- /** Macro for calculating the baud value from a given baud rate when the U2X (double speed) bit is
+ /** Macro for calculating the baud value from a given baud rate when the \c U2X (double speed) bit is
* set.
+ *
+ * \param[in] Baud Target serial UART baud rate.
+ *
+ * \return Closest UBRR register value for the given UART frequency.
*/
- #define SERIAL_2X_UBBRVAL(baud) ((((F_CPU / 8) + (baud / 2)) / (baud)) - 1)
+ #define SERIAL_2X_UBBRVAL(Baud) ((((F_CPU / 8) + (Baud / 2)) / (Baud)) - 1)
/* Function Prototypes: */
/** Transmits a given string located in program space (FLASH) through the USART.