Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Global interrupt management

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().

#define cpu_irq_enable ( )    sei()

Enable interrupts globally.

Referenced by twi_master_init().

#define cpu_irq_is_enabled ( )    cpu_irq_is_enabled_flags(SREG)

Check if interrupts are globally enabled.

Returns
True if interrupts are 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.

Referenced by main().

#define ISR (   vect)

Define service routine for specified interrupt vector.

Usage:

ISR(FOO_vect)
{
...
}
Parameters
vectInterrupt vector name as found in the device header files.

Type used for holding state of interrupt flag.

bool cpu_irq_is_enabled_flags ( irqflags_t  flags)
inlinestatic

Check if interrupts are globally enabled in supplied flags.

Parameters
flagsCurrents state of interrupt flags.
Returns
True if interrupts are enabled.