40 #define _GENERAL_INTERRUPT_ENABLE (0x0008)
42 __attribute__((always_inline))
static inline unsigned int irq_disable(
void)
46 "mov.w r2, %[state]" "\n\t"
47 "bic %[gie], r2" "\n\t"
49 "and %[gie], %[state]" "\n\t"
51 : [gie]
"i"(_GENERAL_INTERRUPT_ENABLE)
58 __attribute__((always_inline))
static inline unsigned int irq_enable(
void)
62 "mov.w r2, %[state]" "\n\t"
64 "bis %[gie], r2" "\n\t"
66 "and %[gie], %[state]" "\n\t"
68 : [gie]
"i"(_GENERAL_INTERRUPT_ENABLE)
75 __attribute__((always_inline))
static inline void irq_restore(
unsigned int state)
78 "bis %[state], r2" "\n\t"
86 __attribute__((always_inline))
static inline int irq_is_in(
void)