Skip to content

Commit bcfd6d1

Browse files
committed
The described fix went missing. ESP32 wouldn't compile on unrelated refactoring.
1 parent 9d27a32 commit bcfd6d1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Diff for: src/SoftwareSerial.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,12 @@ __attribute__((always_inline)) inline void IRAM_ATTR UARTBase::restoreInterrupts
5252
constexpr uint8_t BYTE_ALL_BITS_SET = ~static_cast<uint8_t>(0);
5353

5454
UARTBase::UARTBase() {
55+
m_isrOverflow = false;
5556
}
5657

5758
UARTBase::UARTBase(int8_t rxPin, int8_t txPin, bool invert)
5859
{
60+
m_isrOverflow = false;
5961
m_rxPin = rxPin;
6062
m_txPin = txPin;
6163
m_invert = invert;

Diff for: src/SoftwareSerial.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ class UARTBase : public Stream {
292292
// Member variables
293293
int8_t m_rxPin = -1;
294294
int8_t m_txPin = -1;
295-
bool m_invert;
295+
bool m_invert = false;
296296

297297
private:
298298
// It's legal to exceed the deadline, for instance,
@@ -367,7 +367,7 @@ class UARTBase : public Stream {
367367
// 1 = positive including 0, 0 = negative.
368368
std::unique_ptr<circular_queue<uint32_t, UARTBase*> > m_isrBuffer;
369369
const Delegate<void(uint32_t&&), UARTBase*> m_isrBufferForEachDel = { [](UARTBase* self, uint32_t&& isrTick) { self->rxBits(isrTick); }, this };
370-
std::atomic<bool> m_isrOverflow = false;
370+
std::atomic<bool> m_isrOverflow;
371371
uint32_t m_isrLastTick;
372372
bool m_rxCurParity = false;
373373
Delegate<void(), void*> m_rxHandler;

0 commit comments

Comments
 (0)