File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,13 @@ void HardwareSerial::flush(bool txOnly)
158
158
{
159
159
uartFlushTxOnly (_uart, txOnly);
160
160
}
161
+ void serialEventRun (void )
162
+ {
163
+ if (Serial1.available ()) serialEvent1 ();
164
+ if (Serial2.available ()) serialEvent2 ();
165
+ }
166
+ void serialEvent1 () { }
167
+ void serialEvent2 () { }
161
168
162
169
size_t HardwareSerial::write (uint8_t c)
163
170
{
Original file line number Diff line number Diff line change @@ -106,7 +106,9 @@ class HardwareSerial: public Stream
106
106
uart_t * _uart;
107
107
};
108
108
109
- extern void serialEventRun (void ) __attribute__((weak));
109
+ void serialEventRun (void ) __attribute__((weak));
110
+ extern void serialEvent1 () __attribute__((weak));
111
+ extern void serialEvent2 () __attribute__((weak));
110
112
111
113
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL)
112
114
extern HardwareSerial Serial;
You can’t perform that action at this time.
0 commit comments