Xmega Application Note | |||||
Modules | |
Deprecated interrupt definitions | |
Defines | |
#define | cpu_irq_is_enabled() cpu_irq_is_enabled_flags(SREG) |
#define | cpu_irq_is_enabled() cpu_irq_is_enabled_flags(sysreg_read(AVR32_SR)) |
#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. | |
Typedefs | |
typedef uint8_t | irqflags_t |
Global interrupt flags | |
| |
typedef uint32_t | irqflags_t |
Type used for holding state of interrupt flag. | |
static bool | cpu_irq_is_enabled_flags (irqflags_t flags) |
Check if interrupts are globally enabled in supplied flags. | |
static void | cpu_irq_restore (irqflags_t flags) |
Restore global interrupt flags. | |
static irqflags_t | cpu_irq_save (void) |
Get and clear the global interrupt flags. | |
#define | cpu_irq_disable() __disable_interrupt() |
Disable interrupts globally. | |
#define | cpu_irq_enable() __enable_interrupt() |
Enable interrupts globally. | |
Global interrupt levels | |
| |
static bool | cpu_irq_level_is_enabled_flags (irqflags_t flags, uint32_t level) |
Check if interrupt level is enabled in supplied flags. | |
#define | cpu_irq_level_is_enabled(level) |
Check if interrupt level is enabled. |
This is a driver for global enabling and disabling of interrupts.
#define cpu_irq_disable | ( | ) | __disable_interrupt() |
Disable interrupts globally.
Referenced by cpu_irq_save(), and sleepmgr_enter_sleep().
#define cpu_irq_enable | ( | ) | __enable_interrupt() |
Enable interrupts globally.
Referenced by sleepmgr_enter_sleep().
#define cpu_irq_is_enabled | ( | ) | cpu_irq_is_enabled_flags(SREG) |
Definition at line 115 of file interrupt_avr8.h.
#define cpu_irq_is_enabled | ( | ) | cpu_irq_is_enabled_flags(sysreg_read(AVR32_SR)) |
Definition at line 184 of file interrupt_avr32.h.
#define cpu_irq_level_is_enabled | ( | level | ) |
cpu_irq_level_is_enabled_flags(sysreg_read(AVR32_SR), \ TPASTE3(AVR32_SR_I, level, M_OFFSET))
Check if interrupt level is enabled.
level | Interrupt level (0 to 3). |
Definition at line 212 of file interrupt_avr32.h.
#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.
Definition at line 78 of file interrupt_avr8.h.
typedef uint8_t irqflags_t |
Definition at line 89 of file interrupt_avr8.h.
Type used for holding state of interrupt flag.
Definition at line 161 of file interrupt_avr32.h.
bool cpu_irq_is_enabled_flags | ( | irqflags_t | flags | ) | [inline, static] |
Check if interrupts are globally enabled in supplied flags.
flags | Currents state of interrupt flags. |
Definition at line 104 of file interrupt_avr8.h.
static bool cpu_irq_level_is_enabled_flags | ( | irqflags_t | flags, | |
uint32_t | level | |||
) | [inline, static] |
Check if interrupt level is enabled in supplied flags.
flags | State of interrupt flags. | |
level | Bit position for interrupt level. |
Definition at line 197 of file interrupt_avr32.h.
void cpu_irq_restore | ( | irqflags_t | flags | ) | [inline, static] |
Restore global interrupt flags.
Use in conjunction with cpu_irq_save.
flags | State to set interrupt flag to. |
Definition at line 98 of file interrupt_avr8.h.
References barrier.
Referenced by adc_disable(), adc_enable(), adc_flush(), adc_get_signed_compare_value(), adc_get_unsigned_compare_value(), adc_read_configuration(), adc_start_conversion(), adc_write_configuration(), adcch_get_signed_result(), adcch_get_unsigned_result(), adcch_read_configuration(), adcch_write_configuration(), osc_disable(), osc_enable_autocalibration(), osc_enable_internal(), pll_disable(), pll_enable(), rtc_get_time(), sleepmgr_lock_mode(), sleepmgr_unlock_mode(), sysclk_disable_module(), sysclk_enable_module(), and sysclk_set_source().
00099 { 00100 barrier(); 00101 SREG = flags; 00102 }
irqflags_t cpu_irq_save | ( | void | ) | [inline, static] |
Get and clear the global interrupt flags.
Use in conjunction with cpu_irq_restore.
Definition at line 91 of file interrupt_avr8.h.
References cpu_irq_disable.
Referenced by adc_disable(), adc_enable(), adc_flush(), adc_get_signed_compare_value(), adc_get_unsigned_compare_value(), adc_read_configuration(), adc_start_conversion(), adc_write_configuration(), adcch_get_signed_result(), adcch_get_unsigned_result(), adcch_read_configuration(), adcch_write_configuration(), osc_disable(), osc_enable_autocalibration(), osc_enable_internal(), pll_disable(), pll_enable(), rtc_get_time(), sleepmgr_lock_mode(), sleepmgr_unlock_mode(), sysclk_disable_module(), sysclk_enable_module(), and sysclk_set_source().
00092 { 00093 irqflags_t val = SREG; 00094 cpu_irq_disable(); 00095 return val; 00096 }
Generated on Fri Oct 22 12:15:26 2010 for AVR1300 Using the Xmega ADC by ![]() |