Per-button opaque handles, individual timers, interrupt mode#5
Merged
UncleRus merged 1 commit intoesp-idf-lib:mainfrom Mar 14, 2026
Merged
Per-button opaque handles, individual timers, interrupt mode#5UncleRus merged 1 commit intoesp-idf-lib:mainfrom
UncleRus merged 1 commit intoesp-idf-lib:mainfrom
Conversation
65198c6 to
f86ecf7
Compare
API changed from static array + shared timer to per-button opaque handles (button_create/button_delete). Adds interrupt mode with GPIO ISR and debounce timer. Bumps version to 2.0.0.
f86ecf7 to
25de2de
Compare
Member
|
Thank you! |
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.
Summary
button_create/button_delete), each with its ownesp_timerand mutexBUTTON_MODE_INTERRUPT) using GPIO ISR + one-shot debounce timer, as an alternative to periodic pollingCLICKEDevent when releasing a button with autorepeat enabledBUTTON_DEFAULT_CONFIG()macro for zero-boilerplate configurationbutton_init/button_donewith user-allocatedbutton_tstructs tobutton_create/button_deletewith opaquebutton_handle_thandles. The callback signature has also changed to receive abutton_event_tstruct.Resolves #3, resolves #4.