Atmel Software Framework

interrupt_avr32.h File Reference

Global interrupt management for 32-bit AVR.

Copyright (c) 2010-2016 Atmel Corporation. All rights reserved.

#include <compiler.h>
#include <preprocessor/tpaste.h>
#include <intc.h>

Macros

#define Disable_global_interrupt()   cpu_irq_disable()
 
#define Disable_interrupt_level(level)   cpu_irq_disable_level(level)
 
#define Enable_global_interrupt()   cpu_irq_enable()
 
#define Enable_interrupt_level(level)   cpu_irq_enable_level(level)
 
#define Is_global_interrupt_enabled()   cpu_irq_is_enabled()
 
#define Is_interrupt_level_enabled(level)   cpu_irq_level_is_enabled(level)
 
Interrupt Service Routine definition and registration
#define ISR(func, int_grp, int_lvl)   __attribute__((__interrupt__)) static void func (void)
 Macro to declare an interrupt service routine. More...
 
#define irq_initialize_vectors()   INTC_init_interrupts()
 Initialize interrupt vectors. More...
 
#define irq_register_handler(func, int_num, int_lvl)
 Register handler for interrupt. More...
 
Interrupt protection of code sections
Note
Use cpu_irq_save and cpu_irq_restore instead of these macros.
#define AVR32_ENTER_CRITICAL_REGION()
 Start section with code protected against interrupts. More...
 
#define AVR32_LEAVE_CRITICAL_REGION()
 End section with code protected against interrupts. More...
 

Typedefs

typedef void(* __int_handler) (void)
 Pointer to interrupt handler. More...
 

Global interrupt flags

#define cpu_irq_enable()
 Enable interrupts globally. More...
 
#define cpu_irq_disable()
 Disable interrupts globally. More...
 
#define cpu_irq_is_enabled()   cpu_irq_is_enabled_flags(sysreg_read(AVR32_SR))
 Check if interrupts are globally enabled. More...
 
typedef uint32_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 bool cpu_irq_is_enabled_flags (irqflags_t flags)
 Check if interrupts are globally enabled in supplied flags. More...
 
static void cpu_irq_restore (irqflags_t flags)
 Restore global interrupt flags. More...
 

Global interrupt levels

#define cpu_irq_level_is_enabled(level)
 Check if interrupt level is enabled. More...
 
#define cpu_irq_enable_level(level)
 Enable interrupt level. More...
 
#define cpu_irq_disable_level(level)
 Disable interrupt level. More...
 
static bool cpu_irq_level_is_enabled_flags (irqflags_t flags, uint32_t level)
 Check if interrupt level is enabled in supplied flags. More...