summaryrefslogtreecommitdiff
path: root/libcpu/arm
diff options
context:
space:
mode:
authorbernard.xiong <[email protected]>2009-10-24 23:07:55 +0000
committerbernard.xiong <[email protected]>2009-10-24 23:07:55 +0000
commita7c36ff98ca5ab349a41aaf6efa4403d151106aa (patch)
treec9f375aad8b25e576f3be75737ff8f6d1354648b /libcpu/arm
parent17c81cfa214c14b9d07d2a8cbda4b145bec9b6f9 (diff)
fix rt_serial_read bug when there is no data in the buffer. -- found by [email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@129 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'libcpu/arm')
-rw-r--r--libcpu/arm/stm32/serial.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libcpu/arm/stm32/serial.c b/libcpu/arm/stm32/serial.c
index 66cd85fe98..7d4795a9ad 100644
--- a/libcpu/arm/stm32/serial.c
+++ b/libcpu/arm/stm32/serial.c
@@ -10,6 +10,8 @@
* Change Logs:
* Date Author Notes
* 2009-02-05 Bernard first version
+ * 2009-10-25 Bernard fix rt_serial_read bug when there is no data
+ * in the buffer.
*/
#include "serial.h"
@@ -198,6 +200,7 @@ static rt_size_t rt_serial_read (rt_device_t dev, rt_off_t pos, void* buffer, rt
{
/* set error code */
err_code = -RT_EEMPTY;
+ break;
}
else
{