Skip to content

Commit

Permalink
[update] format code
Browse files Browse the repository at this point in the history
  • Loading branch information
liukangcc committed Mar 15, 2022
1 parent d99193e commit 0b992c4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/finsh/shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,13 @@ int finsh_getchar(void)
RT_ASSERT(shell != RT_NULL);

device = shell->device;
if (device == RT_NULL)
{
return -1; /* EOF */
}

while (rt_device_read(device, -1, &ch, 1) != 1)
{
{
rt_sem_take(&shell->rx_sem, RT_WAITING_FOREVER);
if (shell->device != device)
{
Expand Down

0 comments on commit 0b992c4

Please sign in to comment.