提交 3c0fbf0c 编写于 作者: B bernard

[finsh] Fix the C99 issue.

上级 296d57e8
......@@ -84,13 +84,12 @@ const char *finsh_get_prompt()
static char finsh_getchar(void)
{
RT_ASSERT(shell != RT_NULL);
#ifdef RT_USING_POSIX_STDIN
return getchar();
#else
char ch;
RT_ASSERT(shell != RT_NULL);
while (rt_device_read(shell->device, -1, &ch, 1) != 1)
rt_sem_take(&shell->rx_sem, RT_WAITING_FOREVER);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册