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

RTC - Replace Serial.print()s from ISR functions in example Sketches #178

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

jacobhylen
Copy link
Contributor

@jacobhylen jacobhylen commented Nov 7, 2023

Currently some of the RTC examples include Serial.print() calls in callback functions that are triggered by an ISR. This is bad practice because:

  • Serial.print() can depend on interrupts, which are disabled while another ISR function is running.
  • ISR functions should be as short and quick as possible.

This PR removes Serial.print() calls from callback functions in the RTC example sketches.

They are replaced by flags and conditional statements in the loops, keeping the callback functions as short as possible.

@JAndrassy
Copy link
Contributor

JAndrassy commented Nov 7, 2023

please add more context into the title. it is the issue tracker for the whole platform

@jacobhylen jacobhylen changed the title Remove Serial.print()s from callback functions Replace Serial.print()s from ISR functions in RTC example Sketches Nov 7, 2023
@jacobhylen jacobhylen changed the title Replace Serial.print()s from ISR functions in RTC example Sketches RTC - Replace Serial.print()s from ISR functions in example Sketches Nov 7, 2023
@facchinm facchinm merged commit b6987b0 into arduino:main Nov 13, 2023
6 checks passed
@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: documentation Related to documentation for the project labels Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: documentation Related to documentation for the project type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants