1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

Fix typo in SerialEvent3 handling

In commit 0e97bcb (Put each HardwareSerial instance in its own .cpp
file), the serial event handling was changed. This was probably a
copy-paste typo.

The effect of this bug was that SerialEvent3 would not run, unless
SerialEvent2 was defined, but also that if SerialEvent2 is defined but
SerialEvent3 is not, this could cause a reset (call to NULL pointer).

This closes #1967, thanks to Peter Olson for finding the bug and fix.
This commit is contained in:
Matthijs Kooijman 2014-03-27 19:20:54 +01:00
parent ff85589b62
commit c734246c46

View File

@ -72,7 +72,7 @@ void serialEventRun(void)
if (Serial2_available && serialEvent2 && Serial2_available()) serialEvent2();
#endif
#if defined(HAVE_HWSERIAL3)
if (Serial3_available && serialEvent2 && Serial3_available()) serialEvent3();
if (Serial3_available && serialEvent3 && Serial3_available()) serialEvent3();
#endif
}