diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-06-03 12:53:19 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-06-03 12:53:19 +0000 |
commit | 062707c0279cc65f73a42cef10ef75954619bd30 (patch) | |
tree | 62885e8c82d9b89d3d6a4b55d9773ad50be4f4d5 /os | |
parent | d9578ad0dbbb3cad59073de52cf258497acb5778 (diff) | |
download | ChibiOS-062707c0279cc65f73a42cef10ef75954619bd30.tar.gz ChibiOS-062707c0279cc65f73a42cef10ef75954619bd30.tar.bz2 ChibiOS-062707c0279cc65f73a42cef10ef75954619bd30.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1992 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r-- | os/hal/platforms/STM8/serial_lld.c | 4 |
1 files changed, 2 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 &
|