We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b1cf68 commit bef21efCopy full SHA for bef21ef
uart_sample.c
@@ -39,7 +39,7 @@ static void serial_thread_entry(void* parameter)
39
40
/* 查找系统中的串口设备 */
41
serial = rt_device_find(uart_name);
42
-
+
43
if (serial != RT_NULL)
44
{
45
rt_sem_init(&rx_sem, "rx_sem", 0, RT_IPC_FLAG_FIFO);
@@ -58,9 +58,9 @@ static void serial_thread_entry(void* parameter)
58
/* 阻塞等待接收信号量,等到信号量后再次读取数据 */
59
rt_sem_take(&rx_sem, RT_WAITING_FOREVER);
60
}
61
- /* 读取到的数据通过串口错位输出 */
62
- ch = ch + 1;
63
- rt_device_write(serial, 0, &ch, 1);
+ /* 读取到的数据通过串口错位输出 */
+ ch = ch + 1;
+ rt_device_write(serial, 0, &ch, 1);
64
65
66
else
0 commit comments