arch/avr8/include/arch/interrupt.h File Reference

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.

Detailed Description

AVR-specific interrupt masking/unmasking.

Copyright (C) 2009 Atmel Corporation. All rights reserved.

Definition in file interrupt.h.


Define Documentation

 
#define cpu_irq_is_enabled (  )     cpu_irq_is_enabled_flags(cpu_read_reg8(SREG))

Test if interrupts are enabled.

Return values:
true If interrups are enabled
false If interrupts are disabled

Definition at line 91 of file interrupt.h.

Referenced by softirq_poll(), and workqueue_pop_task().


Typedef Documentation

Type used for holding the current interrupt state.

Definition at line 48 of file interrupt.h.


Function Documentation

static __always_inline bool cpu_irq_is_enabled_flags ( irqflags_t  flags  )  [static]

Test if interrupts are enabled in flags.

Parameters:
flags Saved interrupt state
Return values:
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]
static __always_inline irqflags_t cpu_irq_save ( void   )  [static]

Save the current interrupt state and disable interrupts.

Returns:
A cookie indicating the interrupt state before interrupts were disabled.

Definition at line 55 of file interrupt.h.

References cpu_irq_disable, and cpu_read_reg8.

Referenced by at90usb_udc_configure_ep(), at90usb_udc_device_worker(), at90usb_udc_ep_flush(), atomic_add(), atomic_clear_bit(), atomic_set_bit(), atomic_sub(), atomic_test_and_clear_bit(), atomic_test_and_set_bit(), atomic_toggle_bit(), msc_do_read(), msc_queue_empty(), sysclk_disable_module(), and sysclk_enable_module().

Generated on Thu Apr 29 14:10:34 2010 for xplain-bc by  doxygen 1.6.3