Skip to content

Commit 7bd71f0

Browse files
committed
SoftwareSerial: fix flush() behaviour
Fix #4029
1 parent ab82f33 commit 7bd71f0

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

libraries/SoftwareSerial/SoftwareSerial.cpp

+1-7
Original file line numberDiff line numberDiff line change
@@ -469,13 +469,7 @@ size_t SoftwareSerial::write(uint8_t b)
469469

470470
void SoftwareSerial::flush()
471471
{
472-
if (!isListening())
473-
return;
474-
475-
uint8_t oldSREG = SREG;
476-
cli();
477-
_receive_buffer_head = _receive_buffer_tail = 0;
478-
SREG = oldSREG;
472+
// There is no tx buffering, simply return
479473
}
480474

481475
int SoftwareSerial::peek()

0 commit comments

Comments
 (0)