37#define _GENERAL_INTERRUPT_ENABLE   (0x0008) 
   39__attribute__((always_inline)) 
static inline unsigned int irq_disable(
void)
 
   43        "mov.w SR, %[state]"                "\n\t" 
   44        "bic %[gie], SR"                    "\n\t" 
   46        "and %[gie], %[state]"              "\n\t" 
   48        : [gie]     
"i"(_GENERAL_INTERRUPT_ENABLE)
 
   55__attribute__((always_inline)) 
static inline unsigned int irq_enable(
void)
 
   59        "mov.w SR, %[state]"                "\n\t" 
   61        "bis %[gie], SR"                    "\n\t" 
   63        "and %[gie], %[state]"              "\n\t" 
   65        : [gie]     
"i"(_GENERAL_INTERRUPT_ENABLE)
 
   72__attribute__((always_inline)) 
static inline void irq_restore(
unsigned int state)
 
   75        "bis %[state], SR"                    "\n\t" 
   83__attribute__((always_inline)) 
static inline bool irq_is_in(
void)
 
   88__attribute__((always_inline)) 
static inline bool irq_is_enabled(
void)
 
   92        "mov.w SR,%[state]"                   "\n\t" 
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.
 
volatile int __irq_is_in
The current ISR state (inside or not)