[问题] serial 导向问题

楼主: yshihyu (yshihyu)   2017-03-15 20:23:39
https://gist.github.com/anonymous/dcb1765e005110cab52cfa571ac2ddf7
上面程式是码 hello world 字串导向 /dev/ttyS0
sudo ./test_uart ttyS0
我开cutecom 跟 minicom 想收hello world 字串但都收不到
baud rate 两边都是115200
可是我导向某个终端机
sudo ./test_uart pts/22 可以收到 hello world 字串
不明白为什么 ttyS0 收不到字串
谢谢
作者: derailed   2017-04-03 13:33:00
fd = open(dev_name, O_RDWR | O_NOCTTY | O_NDELAY);?

Links booklink

Contact Us: admin [ a t ] ucptt.com