Skip to content

Commit

Permalink
Bug fix 6.14.1: Set default RX pullup once in ctor, prevents flipping…
Browse files Browse the repository at this point in the history
… of that state on begin().
  • Loading branch information
dok-net committed Oct 30, 2021
1 parent 907db30 commit bd2f6ce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "EspSoftwareSerial",
"version": "6.14.0",
"version": "6.14.1",
"description": "Implementation of the Arduino software serial for ESP8266/ESP32.",
"keywords": [
"serial", "io", "softwareserial"
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=EspSoftwareSerial
version=6.14.0
version=6.14.1
author=Dirk Kaar, Peter Lerup
maintainer=Dirk Kaar <[email protected]>
sentence=Implementation of the Arduino software serial for ESP8266/ESP32.
Expand Down
3 changes: 2 additions & 1 deletion src/SoftwareSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ constexpr uint8_t BYTE_ALL_BITS_SET = ~static_cast<uint8_t>(0);

SoftwareSerial::SoftwareSerial() {
m_isrOverflow = false;
m_rxGPIOPullupEnabled = true;
}

SoftwareSerial::SoftwareSerial(int8_t rxPin, int8_t txPin, bool invert)
{
m_isrOverflow = false;
m_rxGPIOPullupEnabled = true;
m_rxPin = rxPin;
m_txPin = txPin;
m_invert = invert;
Expand Down Expand Up @@ -126,7 +128,6 @@ void SoftwareSerial::begin(uint32_t baud, SoftwareSerialConfig config,
m_pduBits = m_dataBits + static_cast<bool>(m_parityMode) + m_stopBits;
m_bitCycles = (ESP.getCpuFreqMHz() * 1000000UL + baud / 2) / baud;
m_intTxEnabled = true;
m_rxGPIOPullupEnabled = true;
if (isValidRxGPIOpin(m_rxPin)) {
m_buffer.reset(new circular_queue<uint8_t>((bufCapacity > 0) ? bufCapacity : 64));
if (m_parityMode)
Expand Down

0 comments on commit bd2f6ce

Please sign in to comment.