43__attribute__((always_inline))
static inline unsigned int irq_disable(
void)
47 "in %[dest], __SREG__" "\n\t"
59__attribute__((always_inline))
static inline unsigned int irq_enable(
void)
63 "in %[dest], __SREG__" "\n\t"
75__attribute__((always_inline))
static inline void irq_restore(
unsigned int _state)
77 uint8_t state = (uint8_t)_state;
90 "sbrc %[state], 7" "\n\t"
101__attribute__((always_inline))
static inline bool irq_is_in(
void)
105 __asm__
volatile (
"" : : :
"memory");
117 "in %[dest], __SREG__" "\n\t"
122 return mask & (1 << 7);
148#define AVR8_ISR(vector, function, ...) \
149 ISR(vector, ISR_BLOCK) \
152 function(__VA_ARGS__); \
MAYBE_INLINE void irq_restore(unsigned state)
This function restores the IRQ disable bit in the status register to the value contained within passe...
MAYBE_INLINE unsigned irq_disable(void)
This function sets the IRQ disable bit in the status register.
MAYBE_INLINE bool irq_is_enabled(void)
Test if IRQs are currently enabled.
MAYBE_INLINE unsigned irq_enable(void)
This function clears the IRQ disable bit in the status register.
MAYBE_INLINE bool irq_is_in(void)
Check whether called from interrupt service routine.
#define avr8_state_irq_count
Definition for GPIOR1.
stdio wrapper to extend the C libs stdio