| Xmega Application Note | |||||
This file implements some macros that makes the IAR C-compiler and avr-gcc work with the same code base for the AVR architecture. More...
#include <stdint.h>#include <stdbool.h>#include <stdlib.h>

Go to the source code of this file.
Defines | |
| #define | ENTER_CRITICAL_REGION() |
| #define | LEAVE_CRITICAL_REGION() SREG = saved_sreg; |
This file implements some macros that makes the IAR C-compiler and avr-gcc work with the same code base for the AVR architecture.
Definition in file avr_compiler.h.
| #define ENTER_CRITICAL_REGION | ( | ) |
uint8_t volatile saved_sreg = SREG; \
cli();
This macro will protect the following code from interrupts.
Definition at line 62 of file avr_compiler.h.
Referenced by chip_init(), and vbat_reset().
| #define LEAVE_CRITICAL_REGION | ( | ) | SREG = saved_sreg; |
This macro must always be used in conjunction with ENTER_CRITICAL_REGION so that interrupts are enabled again.
Definition at line 67 of file avr_compiler.h.
Referenced by chip_init(), and vbat_reset().
Generated on Thu Jun 24 16:35:07 2010 for AVR1321: Using the XMEGA 32bit RTC by 1.6.1
|