X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/7f9f97c792dee6875fbca9806422bdd7d6c5a657..fa1a092901319b3b41bf09e0c4cb9cbbec470d6b:/LUFA/Drivers/Peripheral/Serial.h diff --git a/LUFA/Drivers/Peripheral/Serial.h b/LUFA/Drivers/Peripheral/Serial.h index ba466f314..662d7f270 100644 --- a/LUFA/Drivers/Peripheral/Serial.h +++ b/LUFA/Drivers/Peripheral/Serial.h @@ -29,6 +29,7 @@ */ /** \file + * \brief Master include file for the USART peripheral driver. * * Driver for the USART subsystem on supported USB AVRs. */ @@ -68,12 +69,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 / 2)) / (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 / 2)) / (baud)) - 1) /* Pseudo-Function Macros: */ #if defined(__DOXYGEN__)