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";
|
||||
serial = rt_device_find("uart3");
|
||||
|
||||
if (dev)
|
||||
if (serial)
|
||||
rt_device_open(serial, RT_DEVICE_FLAG_RDWR);
|
||||
else
|
||||
return;
|
||||
|
||||
while (1)
|
||||
{
|
||||
rt_device_write(dev, 0, buf, rt_strlen(buf));
|
||||
rt_device_write(serial, 0, buf, rt_strlen(buf));
|
||||
rt_thread_mdelay(500);
|
||||
}
|
||||
// char ch[105];
|
||||
|
Loading…
x
Reference in New Issue
Block a user