当前位置 : 主页 > 编程语言 > c语言 >

c#串口操作

来源:互联网 收集:自由互联 发布时间:2021-06-25
1 SerialPort _Serial = new SerialPort{PortName = " COM1 " ,BaudRate = 9600 ,DataBits = 8 ,Parity = Parity.None,StopBits = StopBits.One,WriteTimeout = SerialPort.InfiniteTimeout,ReadTimeout = SerialPort.InfiniteTimeout,Handshake = Handshake.

1

SerialPort _Serial = new SerialPort
{
PortName = "COM1",
BaudRate = 9600,
DataBits = 8,
Parity = Parity.None,
StopBits = StopBits.One,
WriteTimeout = SerialPort.InfiniteTimeout,
ReadTimeout = SerialPort.InfiniteTimeout,
Handshake = Handshake.None,
ReadBufferSize = 1024
};
网友评论