Repository navigation
A callback attached while stopped is called after Resume() - #8
Merged
Merged
Conversation
Found in AtmegaTimer, which took the code of 3: the interrupt stayed off, so the callback was never called.
AttachInterrupt() enabled the overflow interrupt only while the timer ran, and Resume() does not touch it: a callback attached while stopped was never called. It is enabled while the timer is stopped as well now, where the counter stands and comes to no bottom before Resume(). OIL 7.
This was referenced Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A callback attached while the timer is stopped is now called once the timer is resumed. This is item 7 of OIL.md.
What changes for a user
Why
AtmegaTimer, which continues TimerTwo from version 2.0.0, found the bug in the same code. It is fixed here before 2.0.0 is tagged, so that the release carries the fix.
How it was checked
make checkpasses: the tests by GCC and clang, under the sanitizers, with every line of the library reached; clang-tidy, cppcheck, the documentation and the examples.