提交 7a1f0e0f 编写于 作者: B bigmagic

when flag is RT_DEVICE_FLAG_STREAM, paser '\n' break!

上级 091089f1
......@@ -221,7 +221,10 @@ rt_inline int _serial_poll_rx(struct rt_serial_device *serial, rt_uint8_t *data,
*data = ch;
data ++; length --;
if (ch == '\n') break;
if(serial->parent.open_flag & RT_DEVICE_FLAG_STREAM)
{
if (ch == '\n') break;
}
}
return size - length;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册