Skip to content

Commit bef21ef

Browse files
committed
修改uart)Sample.c代码缩进
1 parent 0b1cf68 commit bef21ef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

uart_sample.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static void serial_thread_entry(void* parameter)
3939

4040
/* 查找系统中的串口设备 */
4141
serial = rt_device_find(uart_name);
42-
42+
4343
if (serial != RT_NULL)
4444
{
4545
rt_sem_init(&rx_sem, "rx_sem", 0, RT_IPC_FLAG_FIFO);
@@ -58,9 +58,9 @@ static void serial_thread_entry(void* parameter)
5858
/* 阻塞等待接收信号量,等到信号量后再次读取数据 */
5959
rt_sem_take(&rx_sem, RT_WAITING_FOREVER);
6060
}
61-
/* 读取到的数据通过串口错位输出 */
62-
ch = ch + 1;
63-
rt_device_write(serial, 0, &ch, 1);
61+
/* 读取到的数据通过串口错位输出 */
62+
ch = ch + 1;
63+
rt_device_write(serial, 0, &ch, 1);
6464
}
6565
}
6666
else

0 commit comments

Comments
 (0)