Skip to content

Commit

Permalink
Fix SerialUART flush (#215)
Browse files Browse the repository at this point in the history
Serial1.flush/Serial2.flush was not waiting for the proper FIFO to clear.
Use the proper call from the Pico SDK.

Thanks to Peter Remias for noting it.
  • Loading branch information
earlephilhower authored Jun 16, 2021
1 parent b02b9c4 commit 2747681
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cores/rp2040/SerialUART.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void SerialUART::flush() {
if (!_running || !m) {
return;
}
uart_default_tx_wait_blocking();
uart_tx_wait_blocking(_uart);
}

size_t SerialUART::write(uint8_t c) {
Expand Down

0 comments on commit 2747681

Please sign in to comment.