X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/d4ca7fb44c7d326b96cf391f0275dc323dbe24de..fa1a092901319b3b41bf09e0c4cb9cbbec470d6b:/LUFA/Drivers/Peripheral/Serial.h diff --git a/LUFA/Drivers/Peripheral/Serial.h b/LUFA/Drivers/Peripheral/Serial.h index 433d55eab..662d7f270 100644 --- a/LUFA/Drivers/Peripheral/Serial.h +++ b/LUFA/Drivers/Peripheral/Serial.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2009. + Copyright (C) Dean Camera, 2010. dean [at] fourwalledcubicle [dot] com www.fourwalledcubicle.com */ /* - Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -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__)