dev->serial
This commit is contained in:
parent
d9877e5087
commit
6c6cfda8f9
@ -422,14 +422,14 @@ static void serial_thread_entry(void *parameter)
|
|||||||
char buf[] = "hello rt-thread!\r\n";
|
char buf[] = "hello rt-thread!\r\n";
|
||||||
serial = rt_device_find("uart3");
|
serial = rt_device_find("uart3");
|
||||||
|
|
||||||
if (dev)
|
if (serial)
|
||||||
rt_device_open(serial, RT_DEVICE_FLAG_RDWR);
|
rt_device_open(serial, RT_DEVICE_FLAG_RDWR);
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
rt_device_write(dev, 0, buf, rt_strlen(buf));
|
rt_device_write(serial, 0, buf, rt_strlen(buf));
|
||||||
rt_thread_mdelay(500);
|
rt_thread_mdelay(500);
|
||||||
}
|
}
|
||||||
// char ch[105];
|
// char ch[105];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user