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

feat(interrupt): Improve Interrupt implementation and API #348

Merged
merged 3 commits into from
Dec 4, 2024

Conversation

finger563
Copy link
Contributor

Description

  • Add enable / disable APIs for specific interrutps
  • Add remove APIs for specific interrupts
  • Add remove_all
  • Add disable_all
  • Refactor how interrupts are configured somewhat to ensure they are not enabled until after the handler has been registered
  • Update interrupt PinConfig to have auto_reenable flag (default=true) to mirror previous behavior, but to allow the interrupt to not re-trigger until explicitly re-enabled by the caller.
  • Add more info about interrupt configuration to class doc

Motivation and Context

More complex use of the interrupts class necessitated being able to manually enable/disable interrupts via caller code. This update also enables better use of level interrupts in addition to edge interrupts.

How has this been tested?

  • Building and running interrupt/example on QtPy ESP32s3.
  • Building within a more complex project using level interrupts and such.

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

CleanShot 2024-12-04 at 13 08 08

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

* Add `enable` / `disable` APIs for specific interrutps
* Add `remove` APIs for specific interrupts
* Add `remove_all`
* Add `disable_all`
* Refactor how interrupts are configured somewhat to ensure they are not enabled until after the handler has been registered
* Update interrupt PinConfig to have `auto_reenable` flag (default=true) to mirror previous behavior, but to allow the interrupt to not re-trigger until explicitly re-enabled by the caller.
* Add more info about interrupt configuration to class doc
@finger563 finger563 self-assigned this Dec 4, 2024
@finger563 finger563 added enhancement New feature or request interrupt labels Dec 4, 2024
Copy link

github-actions bot commented Dec 4, 2024

✅Static analysis result - no issues found! ✅

@finger563 finger563 merged commit 730f59b into main Dec 4, 2024
68 of 69 checks passed
@finger563 finger563 deleted the feat/interrupt-api-and-improvement-update branch December 4, 2024 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request interrupt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant