Add SerialEvent() callback to loop processing by earlephilhower · Pull Request #7505 · esp8266/Arduino

Hi, just stumbled over this change and noticed that the code in line 170 ff. ended up within the #if !defined block. Seems strange.

EDIT: Sorry, forget that, just noticed that Serial is hardcoded in the function.

#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL)
HardwareSerial Serial(UART0);

// Executed at end of loop() processing when > 0 bytes available in the Serial port
void serialEventRun(void)
{
  if (serialEvent && Serial.available()) {
    serialEvent();
  }
}
#endif