AVR-specific interrupt masking/unmasking. More...
#include <compiler.h>#include <cpu/regs.h>#include <types.h>Go to the source code of this file.
Defines | |
| #define | cpu_irq_is_enabled() cpu_irq_is_enabled_flags(cpu_read_reg8(SREG)) |
| Test if interrupts are enabled. | |
Typedefs | |
| typedef uint8_t | irqflags_t |
| Type used for holding the current interrupt state. | |
Functions | |
| static __always_inline irqflags_t | cpu_irq_save (void) |
| Save the current interrupt state and disable interrupts. | |
| static __always_inline void | cpu_irq_restore (irqflags_t flags) |
| Restore saved interrupt state. | |
| static __always_inline bool | cpu_irq_is_enabled_flags (irqflags_t flags) |
| Test if interrupts are enabled in flags. | |
AVR-specific interrupt masking/unmasking.
Copyright (C) 2009 Atmel Corporation. All rights reserved.
Definition in file interrupt.h.
| #define cpu_irq_is_enabled | ( | ) | cpu_irq_is_enabled_flags(cpu_read_reg8(SREG)) |
Test if interrupts are enabled.
| true | If interrups are enabled | |
| false | If interrupts are disabled |
Definition at line 91 of file interrupt.h.
| typedef uint8_t irqflags_t |
Type used for holding the current interrupt state.
Definition at line 48 of file interrupt.h.
| static __always_inline bool cpu_irq_is_enabled_flags | ( | irqflags_t | flags | ) | [static] |
Test if interrupts are enabled in flags.
| flags | Saved interrupt state |
| true | If flags indicates interrups are enabled | |
| false | If flags indicates interrupts are disabled |
Definition at line 81 of file interrupt.h.
References CPUR_SREG_I.
| static __always_inline void cpu_irq_restore | ( | irqflags_t | flags | ) | [static] |
Restore saved interrupt state.
| flags | A cookie returned by cpu_irq_save() |
Definition at line 69 of file interrupt.h.
References barrier, and cpu_write_reg8.
Referenced by atomic_add(), atomic_clear_bit(), atomic_set_bit(), atomic_sub(), atomic_test_and_clear_bit(), atomic_test_and_set_bit(), and atomic_toggle_bit().
| static __always_inline irqflags_t cpu_irq_save | ( | void | ) | [static] |
Save the current interrupt state and disable interrupts.
Definition at line 55 of file interrupt.h.
References cpu_irq_disable, and cpu_read_reg8.
Referenced by atomic_add(), atomic_clear_bit(), atomic_set_bit(), atomic_sub(), atomic_test_and_clear_bit(), atomic_test_and_set_bit(), and atomic_toggle_bit().
1.6.3