提交 f166ac94 编写于 作者: Z zylx

[net][at] fix server repeated enter issue

上级 e5d9bb90
......@@ -352,10 +352,10 @@ static char at_server_gerchar(void)
{
char ch;
if (rt_device_read(at_server_local->device, 0, &ch, 1) == 0)
while (rt_device_read(at_server_local->device, 0, &ch, 1) == 0)
{
rt_sem_control(at_server_local->rx_notice, RT_IPC_CMD_RESET, RT_NULL);
rt_sem_take(at_server_local->rx_notice, RT_WAITING_FOREVER);
rt_device_read(at_server_local->device, 0, &ch, 1);
}
return ch;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册