File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,11 @@ void HardwareSerial::_tx_udr_empty_irq(void)
100
100
// actually got written. Other r/w bits are preserved, and zeroes
101
101
// written to the rest.
102
102
103
+ #ifdef MPCM0
103
104
*_ucsra = ((*_ucsra) & ((1 << U2X0) | (1 << MPCM0))) | (1 << TXC0);
105
+ #else
106
+ *_ucsra = ((*_ucsra) & ((1 << U2X0) | (1 << TXC0)));
107
+ #endif
104
108
105
109
if (_tx_buffer_head == _tx_buffer_tail) {
106
110
// Buffer empty, so disable interrupts
@@ -236,7 +240,11 @@ size_t HardwareSerial::write(uint8_t c)
236
240
// be cleared when no bytes are left, causing flush() to hang
237
241
ATOMIC_BLOCK (ATOMIC_RESTORESTATE) {
238
242
*_udr = c;
243
+ #ifdef MPCM0
239
244
*_ucsra = ((*_ucsra) & ((1 << U2X0) | (1 << MPCM0))) | (1 << TXC0);
245
+ #else
246
+ *_ucsra = ((*_ucsra) & ((1 << U2X0) | (1 << TXC0)));
247
+ #endif
240
248
}
241
249
return 1 ;
242
250
}
You can’t perform that action at this time.
0 commit comments