components,finsh,shell: do not sleep when there is no input

This commit is contained in:
Zihao Yu 2024-01-11 01:43:46 +08:00
parent ef2f35cee7
commit 31be4bd348

View file

@ -171,7 +171,7 @@ int finsh_getchar(void)
while (rt_device_read(device, -1, &ch, 1) != 1)
{
rt_sem_take(&shell->rx_sem, RT_WAITING_FOREVER);
//rt_sem_take(&shell->rx_sem, RT_WAITING_FOREVER);
if (shell->device != device)
{
device = shell->device;