From 770bf192d53c275142fe991fce97d5c1c9ec6ffd Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 10 Feb 2013 00:46:27 +0000 Subject: [PATCH] Fix a readline bug. If a NUL is received, it would return end-of-file git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5633 42af7a65-404d-4744-a932-0658087f49c3 --- arch/arm/src/stm32/stm32_serial.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/src/stm32/stm32_serial.c b/arch/arm/src/stm32/stm32_serial.c index 18e65f1d9a..327e515b5f 100644 --- a/arch/arm/src/stm32/stm32_serial.c +++ b/arch/arm/src/stm32/stm32_serial.c @@ -981,6 +981,8 @@ static void up_setspeed(struct uart_dev_s *dev) } else { + DEBUGASSERT(usartdiv8 >= 8); + /* Perform mysterious operations on bits 0-3 */ brr = ((usartdiv8 & 0xfff0) | ((usartdiv8 & 0x000f) >> 1));