File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change 2323#endif
2424
2525void serialEvent (void ) __attribute__((weak));
26- void serialEvent (void ) {}
2726
2827#if SOC_UART_NUM > 1
2928void serialEvent1 (void ) __attribute__((weak));
30- void serialEvent1 (void ) {}
3129#endif /* SOC_UART_NUM > 1 */
3230
3331#if SOC_UART_NUM > 2
3432void serialEvent2 (void ) __attribute__((weak));
35- void serialEvent2 (void ) {}
3633#endif /* SOC_UART_NUM > 2 */
3734
3835#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL)
@@ -50,19 +47,13 @@ HardwareSerial Serial2(2);
5047
5148void serialEventRun (void )
5249{
53- #if HWCDC_SERIAL_IS_DEFINED == 1 // Hardware JTAG CDC Event
54- if (HWCDCSerial.available ()) HWCDCSerialEvent ();
55- #endif
56- #if USB_SERIAL_IS_DEFINED == 1 // Native USB CDC Event
57- if (USBSerial.available ()) USBSerialEvent ();
58- #endif
5950 // UART0 is default serialEvent()
60- if (Serial.available ()) serialEvent ();
51+ if (serialEvent && Serial.available ()) serialEvent ();
6152#if SOC_UART_NUM > 1
62- if (Serial1.available ()) serialEvent1 ();
53+ if (serialEvent1 && Serial1.available ()) serialEvent1 ();
6354#endif
6455#if SOC_UART_NUM > 2
65- if (Serial2.available ()) serialEvent2 ();
56+ if (serialEvent2 && Serial2.available ()) serialEvent2 ();
6657#endif
6758}
6859#endif
You can’t perform that action at this time.
0 commit comments