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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions include/avr/interrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@
respect to compiler optimizations.
*/

#if defined(__DOXYGEN__)
/** \def interrupts_enable
\ingroup avr_interrupts

Convenience macro that makes code-readability easier over 'sei'. See
sei() for details.
*/
#endif /* DOXYGEN */
#define interrupts_enable sei

#if defined(__DOXYGEN__)
/** \def sei()
\ingroup avr_interrupts
Expand All @@ -81,6 +91,16 @@
# define sei() __asm__ __volatile__ ("sei" ::: "memory")
#endif /* DOXYGEN */

#if defined(__DOXYGEN__)
/** \def interrupts_enable
\ingroup avr_interrupts

Convenience macro that makes code-readability easier over 'cli'. See
cli() for details.
*/
#endif /* DOXYGEN */
#define interrupts_disable cli

#if defined(__DOXYGEN__)
/** \def cli()
\ingroup avr_interrupts
Expand Down