Skip to content

Commit c2a9f37

Browse files
committed
ESP32 Serial2 Fix
1 parent e056966 commit c2a9f37

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Diff for: library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ArduinoRS485
2-
version=1.0.5
2+
version=1.0.6
33
author=Arduino
44
maintainer=Arduino <[email protected]>
55
sentence=Enables sending and receiving data using the RS-485 standard with RS-485 shields, like the MKR 485 Shield.

Diff for: src/RS485.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ void RS485Class::endTransmission()
137137
}
138138

139139
_transmisionBegun = false;
140+
#ifdef ESP32
141+
// there is a bug in ESP32 for Serial2
142+
while(_serial->available())
143+
_serial->read();
144+
#endif
140145
}
141146

142147
void RS485Class::receive()

0 commit comments

Comments
 (0)