清空接收缓冲却
请看代码:
private SerialPort sp = new SerialPort();
this.sp.DiscardInBuffer(); //清空接收缓冲区
参考
清空发送缓冲区
如下
//对象声明上面代码
this.sp.DiscardOutBuffer();
参考解释
特此记录
anlog
2022年9月6日
请看代码:
private SerialPort sp = new SerialPort();
this.sp.DiscardInBuffer(); //清空接收缓冲区
参考
如下
//对象声明上面代码
this.sp.DiscardOutBuffer();
参考解释
特此记录
anlog
2022年9月6日