Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cores/arduino/HardwareSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ void HardwareSerial::_tx_udr_empty_irq(void)
// written to the rest.

#ifdef MPCM0
*_ucsra = ((*_ucsra) & ((1 << U2X0) | (1 << MPCM0))) | (1 << TXC0);
*_ucsra = (1 << TXC0) | ((*_ucsra) & ((1 << U2X0) | (1 << MPCM0)));
#else
*_ucsra = ((*_ucsra) & ((1 << U2X0) | (1 << TXC0)));
*_ucsra = (1 << TXC0) | ((*_ucsra) & ((1 << U2X0)));
#endif

if (_tx_buffer_head == _tx_buffer_tail) {
Expand Down Expand Up @@ -241,9 +241,9 @@ size_t HardwareSerial::write(uint8_t c)
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
*_udr = c;
#ifdef MPCM0
*_ucsra = ((*_ucsra) & ((1 << U2X0) | (1 << MPCM0))) | (1 << TXC0);
*_ucsra = (1 << TXC0) | ((*_ucsra) & ((1 << U2X0) | (1 << MPCM0)));
#else
*_ucsra = ((*_ucsra) & ((1 << U2X0) | (1 << TXC0)));
*_ucsra = (1 << TXC0) | ((*_ucsra) & ((1 << U2X0)));
#endif
}
return 1;
Expand Down
Loading