interrupt.h(3)

πŸ“¦ version 2.2.1, in fedora 43, fedora 44, opensuse-leap 16.0

πŸ’– 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