This is a driver for global enabling and disabling of interrupts.
Modules | |
Deprecated interrupt definitions | |
Macros | |
#define | CONFIG_INTERRUPT_FORCE_INTC |
Force usage of the ASF INTC driver. More... | |
#define | irq_initialize_vectors() PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm; |
Initialize interrupt vectors Enables all interrupt levels, with vectors located in the application section and fixed priority scheduling. More... | |
#define | ISR(vect) |
Define service routine for specified interrupt vector. More... | |
Global interrupt flags | |
typedef uint8_t | irqflags_t |
Type used for holding state of interrupt flag. More... | |
static irqflags_t | cpu_irq_save (void) |
Get and clear the global interrupt flags. More... | |
static void | cpu_irq_restore (irqflags_t flags) |
Restore global interrupt flags. More... | |
static bool | cpu_irq_is_enabled_flags (irqflags_t flags) |
Check if interrupts are globally enabled in supplied flags. More... | |
#define | cpu_irq_enable() sei() |
Enable interrupts globally. More... | |
#define | cpu_irq_disable() cli() |
Disable interrupts globally. More... | |
#define | cpu_irq_is_enabled() cpu_irq_is_enabled_flags(SREG) |
Check if interrupts are globally enabled. More... | |
#define CONFIG_INTERRUPT_FORCE_INTC |
Force usage of the ASF INTC driver.
Predefine this symbol when preprocessing to force the use of the ASF INTC driver. This is useful to ensure compatibility across compilers and shall be used only when required by the application needs.
#define cpu_irq_disable | ( | ) | cli() |
Disable interrupts globally.
Referenced by cpu_irq_save(), and sleepmgr_enter_sleep().
#define cpu_irq_enable | ( | ) | sei() |
Enable interrupts globally.
Referenced by main(), sleepmgr_enter_sleep(), and sleepmgr_sleep().
#define cpu_irq_is_enabled | ( | ) | cpu_irq_is_enabled_flags(SREG) |
Check if interrupts are globally enabled.
#define irq_initialize_vectors | ( | ) | PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm; |
Initialize interrupt vectors Enables all interrupt levels, with vectors located in the application section and fixed priority scheduling.
#define ISR | ( | vect | ) |
Define service routine for specified interrupt vector.
Usage:
vect | Interrupt vector name as found in the device header files. |
Type used for holding state of interrupt flag.
|
inlinestatic |
Check if interrupts are globally enabled in supplied flags.
flags | Currents state of interrupt flags. |
|
inlinestatic |
Restore global interrupt flags.
Use in conjunction with cpu_irq_save.
flags | State to set interrupt flag to. |
References barrier.
Referenced by arch_ioport_disable_pin(), arch_ioport_disable_port(), arch_ioport_enable_pin(), arch_ioport_enable_port(), arch_ioport_set_pin_mode(), arch_ioport_set_pin_sense_mode(), arch_ioport_set_port_mode(), arch_ioport_set_port_sense_mode(), osc_disable(), osc_enable_autocalibration(), osc_enable_external(), osc_enable_internal(), pll_disable(), pll_enable(), sleepmgr_lock_mode(), sleepmgr_unlock_mode(), sysclk_disable_module(), sysclk_enable_module(), tc_disable(), and tc_enable().
|
inlinestatic |
Get and clear the global interrupt flags.
Use in conjunction with cpu_irq_restore.
References cpu_irq_disable.
Referenced by arch_ioport_disable_pin(), arch_ioport_disable_port(), arch_ioport_enable_pin(), arch_ioport_enable_port(), arch_ioport_set_pin_mode(), arch_ioport_set_pin_sense_mode(), arch_ioport_set_port_mode(), arch_ioport_set_port_sense_mode(), osc_disable(), osc_enable_autocalibration(), osc_enable_external(), osc_enable_internal(), pll_disable(), pll_enable(), sleepmgr_lock_mode(), sleepmgr_unlock_mode(), sysclk_disable_module(), sysclk_enable_module(), tc_disable(), and tc_enable().