提交 a7c36ff9 编写于 作者: B bernard.xiong

fix rt_serial_read bug when there is no data in the buffer. -- found by freescale@stmsky.com

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@129 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 17c81cfa
......@@ -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
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册