Skip to content

Commit f816e76

Browse files
committed
Merge pull request #3207 from chromhelm/master
Fixed bug with HWSerial flushing
2 parents bd8f793 + ed331a8 commit f816e76

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: hardware/arduino/avr/cores/arduino/HardwareSerial.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ size_t HardwareSerial::write(uint8_t c)
220220
if (_tx_buffer_head == _tx_buffer_tail && bit_is_set(*_ucsra, UDRE0)) {
221221
*_udr = c;
222222
sbi(*_ucsra, TXC0);
223+
_written = true;
223224
return 1;
224225
}
225226
tx_buffer_index_t i = (_tx_buffer_head + 1) % SERIAL_TX_BUFFER_SIZE;

0 commit comments

Comments
 (0)