From 27476815ab77432c14342933f3f3d64d66122321 Mon Sep 17 00:00:00 2001 From: "Earle F. Philhower, III" Date: Wed, 16 Jun 2021 08:25:24 -0700 Subject: [PATCH] Fix SerialUART flush (#215) 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. --- cores/rp2040/SerialUART.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cores/rp2040/SerialUART.cpp b/cores/rp2040/SerialUART.cpp index 0af70afe..ba8d183f 100644 --- a/cores/rp2040/SerialUART.cpp +++ b/cores/rp2040/SerialUART.cpp @@ -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) {