如何在linux os上打开一个COM端口(rs422)? [英] How do i open a com port(rs422) on linux os?

查看:795
本文介绍了如何在linux os上打开一个COM端口(rs422)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何可以读取的C ++范例?

Is there any C++ example which i can read up on?

推荐答案

您可能需要使用 open(2)关闭(2)阅读(2)写入(2) ioctl(2) fcntl(2)系统调用。

You probably need to use the open(2), close(2), read(2), write(2), ioctl(2), fcntl(2) system calls.

串口是相当复杂的东西。了解他们的 ioctl命令 termios

Serial ports are quite complex things. read about their ioctl commands and termios

阅读有关 linux编程(或关于高级unix编程) 。串行端口和 tty (包括伪码)很复杂!

Read a good book about linux programming (or about advanced unix programming). Serial ports, and tty (including pseudo-ttys) are complex!

这篇关于如何在linux os上打开一个COM端口(rs422)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆