interrupt.h(3)
π interrupt.h β avr-libc (3) π
okay bestie, welcome to interrupt.h, part of the avr-libc manual π
this is the header that handles ALL the interrupt flag drama and the whole "write me an interrupt handler function" thing. no cap, it's iconic.
β¨ NAME β¨
interrupt.h
π¦ SYNOPSIS π¦
πΈ Macros πΈ
β‘ Global manipulation of the interrupt flag β‘
the global interrupt flag lives in the I bit of the status register, aka SREG. that's just where it lives, periodt.
dealing with interrupts is CONSTANTLY making you think about atomic access to objects that some interrupt-context code could just... change out from under you π see <util/atomic.h> for that whole situation.
and lowkey, people are always disabling interrupts for a lil bit so they can do stuff without being disturbed π«Ά β but heads up, see Problems with reordering code for the compiler-optimization things you gotta keep in mind. it's giving "read the fine print."
#define sei()
#define cli()
π Macros for writing interrupt handler functions π
#define ISR(vector, attributes)
#define SIGNAL(vector)
#define EMPTY_INTERRUPT(vector)
#define ISR_ALIAS(vector, target_vector)
#define reti()
#define BADISR_vect
π ISR attributes π
#define ISR_BLOCK
#define ISR_NOBLOCK
#define ISR_NAKED
#define ISR_FLATTEN
#define ISR_NOICF
#define ISR_ALIASOF(target_vector)
π Detailed Description π
@{
π Author π
Generated automatically by Doxygen for avr-libc from the source code. yeah, the robots wrote this one π€β¨
and that's the whole page, bestie! this gorgeous thing comes from avr-libc version 2.1.0, dated Sat Jan 29 2022 π mwah, slay, go write some interrupt handlers ππ¦
π¦ where this page comes from
- fedora 43: avr-libc 2.2.1-3.fc43 Β· BSD-3-Clause
- fedora 44: avr-libc 2.2.1-5.fc44 Β· BSD-3-Clause
- opensuse-leap 16.0: avr-libc 2.1.0-bp160.1.33 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms