Add user callback function to the Bluetooth host demo to filter out connections from...
[pub/USBasp.git] / LUFA / Drivers / Peripheral / Serial.h
index 433d55e..662d7f2 100644 (file)
@@ -1,13 +1,13 @@
 /*\r
              LUFA Library\r
 /*\r
              LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
+     Copyright (C) Dean Camera, 2010.\r
               \r
   dean [at] fourwalledcubicle [dot] com\r
       www.fourwalledcubicle.com\r
 */\r
 \r
 /*\r
               \r
   dean [at] fourwalledcubicle [dot] com\r
       www.fourwalledcubicle.com\r
 */\r
 \r
 /*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
 \r
   Permission to use, copy, modify, distribute, and sell this \r
   software and its documentation for any purpose is hereby granted\r
 \r
   Permission to use, copy, modify, distribute, and sell this \r
   software and its documentation for any purpose is hereby granted\r
@@ -29,6 +29,7 @@
 */\r
 \r
 /** \file\r
 */\r
 \r
 /** \file\r
+ *  \brief Master include file for the USART peripheral driver.\r
  *\r
  *  Driver for the USART subsystem on supported USB AVRs.\r
  */\r
  *\r
  *  Driver for the USART subsystem on supported USB AVRs.\r
  */\r
                        /** Macro for calculating the baud value from a given baud rate when the U2X (double speed) bit is\r
                         *  not set.\r
                         */\r
                        /** Macro for calculating the baud value from a given baud rate when the U2X (double speed) bit is\r
                         *  not set.\r
                         */\r
-                       #define SERIAL_UBBRVAL(baud)    (((F_CPU / 16) / (baud)) - 1)\r
+                       #define SERIAL_UBBRVAL(baud)    ((((F_CPU / 16) + (baud / 2)) / (baud)) - 1)\r
 \r
                        /** Macro for calculating the baud value from a given baud rate when the U2X (double speed) bit is\r
                         *  set.\r
                         */\r
 \r
                        /** Macro for calculating the baud value from a given baud rate when the U2X (double speed) bit is\r
                         *  set.\r
                         */\r
-                       #define SERIAL_2X_UBBRVAL(baud) (((F_CPU / 8) / (baud)) - 1)\r
+                       #define SERIAL_2X_UBBRVAL(baud) ((((F_CPU / 8) + (baud / 2)) / (baud)) - 1)\r
 \r
                /* Pseudo-Function Macros: */\r
                        #if defined(__DOXYGEN__)\r
 \r
                /* Pseudo-Function Macros: */\r
                        #if defined(__DOXYGEN__)\r