aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/HardwareSerial.cpp
diff options
context:
space:
mode:
authorchromhelm <chromhelm@users.noreply.github.com>2015-05-21 21:42:40 +0200
committerchromhelm <chromhelm@users.noreply.github.com>2015-05-21 21:42:40 +0200
commit3e7e1384841d31d0fd3d16cd50119d1d48350154 (patch)
tree119bfe0817d412f5e8bfde1dfb49e5f1280fd499 /cores/arduino/HardwareSerial.cpp
parentb40f171220b46e63165deaffc497c080e98f041a (diff)
Fixed bug with flushing
Diffstat (limited to 'cores/arduino/HardwareSerial.cpp')
-rw-r--r--cores/arduino/HardwareSerial.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/cores/arduino/HardwareSerial.cpp b/cores/arduino/HardwareSerial.cpp
index 41935e3..4022698 100644
--- a/cores/arduino/HardwareSerial.cpp
+++ b/cores/arduino/HardwareSerial.cpp
@@ -220,6 +220,7 @@ size_t HardwareSerial::write(uint8_t c)
if (_tx_buffer_head == _tx_buffer_tail && bit_is_set(*_ucsra, UDRE0)) {
*_udr = c;
sbi(*_ucsra, TXC0);
+ _written = true;
return 1;
}
tx_buffer_index_t i = (_tx_buffer_head + 1) % SERIAL_TX_BUFFER_SIZE;