diff options
author | Martino Facchin <facchinm@users.noreply.github.com> | 2015-05-28 09:44:46 +0200 |
---|---|---|
committer | Martino Facchin <facchinm@users.noreply.github.com> | 2015-05-28 09:44:46 +0200 |
commit | cd7eae098c80049b83d809711473791fefee7427 (patch) | |
tree | ab3ce2185306e4ede7feb8b93baeaa1c71e4f30e | |
parent | 1bc9ee33f8ff4d433f8a1c23f07314560dd8f7b2 (diff) | |
parent | 3e7e1384841d31d0fd3d16cd50119d1d48350154 (diff) |
Merge pull request #3207 from chromhelm/master
Fixed bug with HWSerial flushing
-rw-r--r-- | cores/arduino/HardwareSerial.cpp | 1 |
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; |