aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/AVR/serial_lld.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-05-09 07:48:43 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-05-09 07:48:43 +0000
commit86e53137e14f8acbc8997ef583c40db1c15939fe (patch)
treee880d65ee1ff46b4043529231ff6861f4864dda7 /os/hal/platforms/AVR/serial_lld.h
parent3d0610f1cceb8f13b5b73dfe4dfd855450e69664 (diff)
downloadChibiOS-86e53137e14f8acbc8997ef583c40db1c15939fe.tar.gz
ChibiOS-86e53137e14f8acbc8997ef583c40db1c15939fe.tar.bz2
ChibiOS-86e53137e14f8acbc8997ef583c40db1c15939fe.zip
Fixed bug 3299306.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2942 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/AVR/serial_lld.h')
-rw-r--r--os/hal/platforms/AVR/serial_lld.h2
1 files changed, 1 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. */