aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/platforms/AVR/serial_lld.h2
-rw-r--r--readme.txt2
2 files changed, 3 insertions, 1 deletions
diff --git a/os/hal/platforms/AVR/serial_lld.h b/os/hal/platforms/AVR/serial_lld.h
index 7884045fd..f660b7d2d 100644
--- a/os/hal/platforms/AVR/serial_lld.h
+++ b/os/hal/platforms/AVR/serial_lld.h
@@ -106,7 +106,7 @@ typedef struct {
* @brief Macro for baud rate computation.
* @note Make sure the final baud rate is within tolerance.
*/
-#define UBRR(b) ((F_CPU / (b << 4)) - 1)
+#define UBRR(b) (((F_CPU / b) >> 4) - 1)
/*===========================================================================*/
/* External declarations. */
diff --git a/readme.txt b/readme.txt
index cc32f992e..215a6e166 100644
--- a/readme.txt
+++ b/readme.txt
@@ -71,6 +71,8 @@
*****************************************************************************
*** 2.3.2 ***
+- FIX: Fixed invalid BRR() macro in AVR serial driver (bug 3299306)(backported
+ to 2.2.4).
- FIX: Fixed missing IRQ vectors amicable names for STM32 XL devices (bug
3298889)(backported to 2.2.4).
- FIX: Fixed wrong identifier in AVR serial driver (bug 3292084)(backported