Change SerialPort's BaudRate while connection is open

前端 未结 2 405
陌清茗
陌清茗 2021-01-18 02:04

I am using SerialPort class to communicate with an external device. I start the communication at 300 Baud per second however after the initial \"handshake\" I have to switch

2条回答
  •  北海茫月
    2021-01-18 02:39

    It turns out you can change SerialPort.BaudRate while it is open. But the SerialPort.DiscardInBuffer that is mentioned in answer by @Groo is a good tip!

提交回复
热议问题