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

interrupt: Add convenience macros for enable/disable #916

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

oliv3r
Copy link

@oliv3r oliv3r commented Apr 9, 2023

While any seasoned AVR developer should have memorized cli/sei by heart, not everybody is as seasoned or mindful. Further, the three letter accronym also isn't directly discriptive.

Lets introduce a simple macro, similar to 'power_all_disable' etc, to enable/disable interrupts in a more readable way.

While any seasoned AVR developer should have memorized cli/sei by heart,
not everybody is as seasoned or mindful. Further, the three letter
accronym also isn't directly discriptive.

Lets introduce a simple macro, similar to 'power_all_disable' etc, to
enable/disable interrupts in a more readable way.

Signed-off-by: Olliver Schinagl <[email protected]>
@3-14152898
Copy link
Contributor

3-14152898 commented Apr 16, 2024

(I'm aware I'm late to the show, sorry for that.)

Wouldn't it make even more sense to name those macros interrupt_all_disable/interrupt_all_enable instead, in the same vein as the example you've used as an illustration? Both sei and cli affect interrupts globally, just like power_all_disable affects power savings globally.

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.

2 participants