File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -101,9 +101,9 @@ void HardwareSerial::_tx_udr_empty_irq(void)
101101 // written to the rest.
102102
103103#ifdef MPCM0
104- *_ucsra = (( *_ucsra) & ((1 << U2X0) | (1 << MPCM0))) | ( 1 << TXC0 );
104+ *_ucsra = (1 << TXC0) | (( *_ucsra) & ((1 << U2X0) | (1 << MPCM0)));
105105#else
106- *_ucsra = ((*_ucsra) & (( 1 << U2X0 ) | (1 << TXC0 )));
106+ *_ucsra = (1 << TXC0 ) | ((*_ucsra) & (( 1 << U2X0 )));
107107#endif
108108
109109 if (_tx_buffer_head == _tx_buffer_tail) {
@@ -241,9 +241,9 @@ size_t HardwareSerial::write(uint8_t c)
241241 ATOMIC_BLOCK (ATOMIC_RESTORESTATE) {
242242 *_udr = c;
243243#ifdef MPCM0
244- *_ucsra = (( *_ucsra) & ((1 << U2X0) | (1 << MPCM0))) | ( 1 << TXC0 );
244+ *_ucsra = (1 << TXC0) | (( *_ucsra) & ((1 << U2X0) | (1 << MPCM0)));
245245#else
246- *_ucsra = ((*_ucsra) & (( 1 << U2X0 ) | (1 << TXC0 )));
246+ *_ucsra = (1 << TXC0 ) | ((*_ucsra) & (( 1 << U2X0 )));
247247#endif
248248 }
249249 return 1 ;
You can’t perform that action at this time.
0 commit comments