From 062707c0279cc65f73a42cef10ef75954619bd30 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 3 Jun 2010 12:53:19 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1992 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM8/serial_lld.c | 4 ++-- readme.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/os/hal/platforms/STM8/serial_lld.c b/os/hal/platforms/STM8/serial_lld.c index f43c16828..e1549de7c 100644 --- a/os/hal/platforms/STM8/serial_lld.c +++ b/os/hal/platforms/STM8/serial_lld.c @@ -117,7 +117,7 @@ static void notify1(void) { */ static void uart1_init(const SerialConfig *config) { - UART1_BRR2 = ((uint8_t)(config->sc_brr >> 8) % (uint8_t)0xF0) | + UART1_BRR2 = ((uint8_t)(config->sc_brr >> 8) & (uint8_t)0xF0) | ((uint8_t)config->sc_brr & (uint8_t)0x0F); UART1_BRR1 = (uint8_t)(config->sc_brr >> 4); UART1_CR1 = config->sc_mode & @@ -158,7 +158,7 @@ static void notify3(void) { */ static void uart3_init(const SerialConfig *config) { - UART3_BRR2 = ((uint8_t)(config->sc_brr >> 8) % (uint8_t)0xF0) | + UART3_BRR2 = ((uint8_t)(config->sc_brr >> 8) & (uint8_t)0xF0) | ((uint8_t)config->sc_brr & (uint8_t)0x0F); UART3_BRR1 = (uint8_t)(config->sc_brr >> 4); UART3_CR1 = config->sc_mode & diff --git a/readme.txt b/readme.txt index e32988ae3..ac08f1a35 100644 --- a/readme.txt +++ b/readme.txt @@ -59,6 +59,7 @@ ***************************************************************************** *** 1.5.9 *** +- FIX: Fixed STM8 baud rate setup error (bug 3010990). - FIX: Fixed STM8 UART3 driver (bug 3009145). - OPT: Small size optimization in the semaphores subsystem. - OPT: Improvements in the STM8 port, the code is now smaller and generally -- cgit v1.2.3