Clear serial port receive buffer in C#

后端 未结 4 1370
北海茫月
北海茫月 2020-12-15 08:57

Just want to know how do we clear the receive buffer of my serial port in C#. Seems like the data in the receive buffer just keep accumulating. For example, the flow of inc

4条回答
  •  旧时难觅i
    2020-12-15 09:18

    Use port.DiscardOutBuffer(); and port.DiscardInBuffer(); to clear the serial port buffers

提交回复
热议问题