From 86e53137e14f8acbc8997ef583c40db1c15939fe Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 9 May 2011 07:48:43 +0000 Subject: Fixed bug 3299306. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2942 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/AVR/serial_lld.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'os') 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. */ -- cgit v1.2.3