Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SerialEvent() callback to loop processing #7505

Merged
merged 2 commits into from
Aug 6, 2020

Conversation

earlephilhower
Copy link
Collaborator

Match the AVR SerialEvent implicit callback. Callback is executed
in normal user mode, not IRQ, so standard processing can be uses.

Fixes #752 after 5 years. :)

Match the AVR SerialEvent implicit callback.  Callback is executed
in normal user mode, not IRQ, so standard processing can be uses.

Fixes esp8266#752 after 5 years. :)
cores/esp8266/HardwareSerial.cpp Outdated Show resolved Hide resolved
cores/esp8266/core_esp8266_main.cpp Outdated Show resolved Hide resolved
@devyte devyte merged commit 3e567e9 into esp8266:master Aug 6, 2020
@wolfbert
Copy link

wolfbert commented Oct 28, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A small nothing left aside. serialEvent()
3 participants