Xmega Application Note


avr_compiler.h File Reference

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>
Include dependency graph for avr_compiler.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define ENTER_CRITICAL_REGION()
#define LEAVE_CRITICAL_REGION()   SREG = saved_sreg;

Detailed Description

This file implements some macros that makes the IAR C-compiler and avr-gcc work with the same code base for the AVR architecture.

Application note:
AVR1321: Using the XMEGA 32-bit RTC
Documentation
For comprehensive code documentation, supported compilers, compiler settings and supported devices see readme.html
Author:
Atmel Corporation: http://www.atmel.com
Support email: avr@atmel.com
Revision
112
Date
2009-11-18 14:31:39 +0800 (星期三, 18 十一月 2009)


Definition in file avr_compiler.h.


Define Documentation

 
#define ENTER_CRITICAL_REGION (  ) 
Value:
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().

@DOC_TITLE@
Generated on Thu Jun 24 16:35:07 2010 for AVR1321: Using the XMEGA 32bit RTC by doxygen 1.6.1