mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-15 12:29:26 +01:00
Fixed bug with flushing
This commit is contained in:
parent
94b16a550e
commit
ed331a817a
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user