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:
AVR1010: Minimizing the power consumption of XMEGA devices
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
2770
Date
2009-09-11 10:55:22 +0200 (fr, 11 sep 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 59 of file avr_compiler.h.

Referenced by CCPWrite(), RTC32_Reset(), SLEEPMGR_Lock(), and SLEEPMGR_Unlock().

 
#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 64 of file avr_compiler.h.

Referenced by CCPWrite(), RTC32_Reset(), SLEEPMGR_Lock(), and SLEEPMGR_Unlock().

@DOC_TITLE@
Generated on Mon Nov 9 13:44:28 2009 for XMEGA power consumption evaluation code by doxygen 1.5.9