From 17cfb7007f3f4e253d3533ee87349ce1b8e4885e Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 9 May 2013 14:23:34 -0600 Subject: Various changes and bigfixes for problems detected by CppCheck --- nuttx/arch/z80/src/z8/z8_lowuart.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'nuttx/arch/z80') diff --git a/nuttx/arch/z80/src/z8/z8_lowuart.c b/nuttx/arch/z80/src/z8/z8_lowuart.c index cf3f9b324..730ed1b4c 100644 --- a/nuttx/arch/z80/src/z8/z8_lowuart.c +++ b/nuttx/arch/z80/src/z8/z8_lowuart.c @@ -80,11 +80,10 @@ void up_lowserialinit(void) uint8_t val; #ifdef CONFIG_UART0_SERIAL_CONSOLE + /* Set the baudrate */ brg = (freq +(uint32_t)CONFIG_UART0_BAUD * 8) /((uint32_t)CONFIG_UART0_BAUD * 16) ; - /* Set the baudrate */ - putreg8(brg >> 8, U0BRH); putreg8(brg & 0xff, U0BRL); @@ -107,6 +106,8 @@ void up_lowserialinit(void) #elif defined(EZ8_UART1) && defined(CONFIG_UART1_SERIAL_CONSOLE) /* Set the baudrate */ + brg = (freq +(uint32_t)CONFIG_UART1_BAUD * 8) /((uint32_t)CONFIG_UART1_BAUD * 16) ; + putreg8(brg >> 8, U1BRH); putreg8(brg & 0xff, U1BRL); -- cgit v1.2.3