We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3bef544 commit 1d915c6Copy full SHA for 1d915c6
src/SoftwareSerial.cpp
@@ -304,7 +304,7 @@ void IRAM_ATTR UARTBase::writePeriod(
304
GPOS = m_txBitMask;
305
}
306
#else
307
- *m_txReg |= m_txBitMask;
+ *m_txReg = *m_txReg | m_txBitMask;
308
#endif
309
m_periodDuration += dutyCycle;
310
if (offCycle || (withStopBit && !m_invert)) {
@@ -326,7 +326,7 @@ void IRAM_ATTR UARTBase::writePeriod(
326
GPOC = m_txBitMask;
327
328
329
- *m_txReg &= ~m_txBitMask;
+ *m_txReg = *m_txReg & ~m_txBitMask;
330
331
m_periodDuration += offCycle;
332
if (withStopBit && m_invert) lazyDelay();
0 commit comments