Skip to content

Commit

Permalink
Fixes volatile related warning from later gcc releases
Browse files Browse the repository at this point in the history
  • Loading branch information
dok-net committed Jun 24, 2023
1 parent 3bef544 commit 1d915c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SoftwareSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ void IRAM_ATTR UARTBase::writePeriod(
GPOS = m_txBitMask;
}
#else
*m_txReg |= m_txBitMask;
*m_txReg = *m_txReg | m_txBitMask;
#endif
m_periodDuration += dutyCycle;
if (offCycle || (withStopBit && !m_invert)) {
Expand All @@ -326,7 +326,7 @@ void IRAM_ATTR UARTBase::writePeriod(
GPOC = m_txBitMask;
}
#else
*m_txReg &= ~m_txBitMask;
*m_txReg = *m_txReg & ~m_txBitMask;
#endif
m_periodDuration += offCycle;
if (withStopBit && m_invert) lazyDelay();
Expand Down

0 comments on commit 1d915c6

Please sign in to comment.