Skip to content

Commit d96d4fd

Browse files
committed
[fujinet-pc] fix HSIO with serial port SIO
1 parent 7eb9bca commit d96d4fd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/bus/sio/sio.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,10 @@ void systemBus::toggleBaudrate()
687687
#ifdef ESP_PLATFORM
688688
SYSTEM_BUS.uart->set_baudrate(_sioBaud);
689689
#else
690+
fnSioCom.flush_input();
691+
fnSioCom.flush();
692+
// hmm, calling flush() may not be enough to empty TX buffer
693+
fnSystem.delay_microseconds(2000);
690694
fnSioCom.set_baudrate(_sioBaud);
691695
#endif
692696
}

0 commit comments

Comments
 (0)