Skip to content

Commit aa400fd

Browse files
sandeepmistrycmaglie
authored andcommitted
Update flush to also wait for TX buffer to empty
1 parent 158df98 commit aa400fd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cores/arduino/Uart.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ void Uart::end()
5555

5656
void Uart::flush()
5757
{
58+
while(txBuffer.available()); // wait until TX buffer is empty
59+
5860
sercom->flushUART();
5961
}
6062

0 commit comments

Comments
 (0)