aboutsummaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@arduino.cc>2015-11-11 16:28:48 +0100
committerCristian Maglie <c.maglie@arduino.cc>2015-11-11 16:28:48 +0100
commit7bd71f04b0ad70ffb8470fb77052b7f4e0d5b91f (patch)
tree7246f20b7b04cf54ba6cee72846eb5bffac8859c /libraries
parentab82f330b56783704260effc94408a6f30c759e9 (diff)
SoftwareSerial: fix flush() behaviour
Fix #4029
Diffstat (limited to 'libraries')
-rw-r--r--libraries/SoftwareSerial/SoftwareSerial.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/libraries/SoftwareSerial/SoftwareSerial.cpp b/libraries/SoftwareSerial/SoftwareSerial.cpp
index 80df664..0a16ff7 100644
--- a/libraries/SoftwareSerial/SoftwareSerial.cpp
+++ b/libraries/SoftwareSerial/SoftwareSerial.cpp
@@ -469,13 +469,7 @@ size_t SoftwareSerial::write(uint8_t b)
void SoftwareSerial::flush()
{
- if (!isListening())
- return;
-
- uint8_t oldSREG = SREG;
- cli();
- _receive_buffer_head = _receive_buffer_tail = 0;
- SREG = oldSREG;
+ // There is no tx buffering, simply return
}
int SoftwareSerial::peek()