Skip to content

Commit

Permalink
The described fix went missing. ESP32 wouldn't compile on unrelated r…
Browse files Browse the repository at this point in the history
…efactoring.
  • Loading branch information
dok-net committed Apr 21, 2023
1 parent 9d27a32 commit bcfd6d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/SoftwareSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ __attribute__((always_inline)) inline void IRAM_ATTR UARTBase::restoreInterrupts
constexpr uint8_t BYTE_ALL_BITS_SET = ~static_cast<uint8_t>(0);

UARTBase::UARTBase() {
m_isrOverflow = false;
}

UARTBase::UARTBase(int8_t rxPin, int8_t txPin, bool invert)
{
m_isrOverflow = false;
m_rxPin = rxPin;
m_txPin = txPin;
m_invert = invert;
Expand Down
4 changes: 2 additions & 2 deletions src/SoftwareSerial.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ class UARTBase : public Stream {
// Member variables
int8_t m_rxPin = -1;
int8_t m_txPin = -1;
bool m_invert;
bool m_invert = false;

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

1 comment on commit bcfd6d1

@mcspr
Copy link

@mcspr mcspr commented on bcfd6d1 Apr 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

esp8266/Arduino#8915 (comment)
^ just above, removal of = false;

Please sign in to comment.