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)
101
101
// written to the rest.
102
102
103
103
#ifdef MPCM0
104
- *_ucsra = (( *_ucsra) & ((1 << U2X0) | (1 << MPCM0))) | ( 1 << TXC0 );
104
+ *_ucsra = (1 << TXC0) | (( *_ucsra) & ((1 << U2X0) | (1 << MPCM0)));
105
105
#else
106
- *_ucsra = ((*_ucsra) & (( 1 << U2X0 ) | (1 << TXC0 )));
106
+ *_ucsra = (1 << TXC0 ) | ((*_ucsra) & (( 1 << U2X0 )));
107
107
#endif
108
108
109
109
if (_tx_buffer_head == _tx_buffer_tail) {
@@ -241,9 +241,9 @@ size_t HardwareSerial::write(uint8_t c)
241
241
ATOMIC_BLOCK (ATOMIC_RESTORESTATE) {
242
242
*_udr = c;
243
243
#ifdef MPCM0
244
- *_ucsra = (( *_ucsra) & ((1 << U2X0) | (1 << MPCM0))) | ( 1 << TXC0 );
244
+ *_ucsra = (1 << TXC0) | (( *_ucsra) & ((1 << U2X0) | (1 << MPCM0)));
245
245
#else
246
- *_ucsra = ((*_ucsra) & (( 1 << U2X0 ) | (1 << TXC0 )));
246
+ *_ucsra = (1 << TXC0 ) | ((*_ucsra) & (( 1 << U2X0 )));
247
247
#endif
248
248
}
249
249
return 1 ;
You can’t perform that action at this time.
0 commit comments