目录
1、QSerialPort
QSerialPort
是Qt框架中用于串口通信的类。它提供了对串口进行配置、发送和接收数据的功能。
以下是QSerialPort
类常用的一些函数和方法:
open(QIODevice::OpenMode mode)
: 打开串口。mode
参数可以设置为QIODevice::ReadOnly
(只读模式)、QIODevice::WriteOnly
(只写模式)或者QIODevice::ReadWrite
(读写模式)。close()
: 关闭串