compiler.h File Reference

This file redefines dedicated IAR EWAVR and GNU GCC keywords in order to ensure that any source file can be processed by these compilers. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  Union16
union  Union32

Defines

#define _MEM_TYPE_BIT_
#define _MEM_TYPE_FAST_
#define _MEM_TYPE_MEDFAST_
#define _MEM_TYPE_MEDSLOW_
#define _MEM_TYPE_SLOW_
#define Align_down(val, n)   ( (val) & ~((n)-1) )
#define Align_up(val, n)   ( ((val)+(n)-1) & ~((n)-1) )
#define bit_is_clear(PORT, POSITION)   ((PORT & (1<<POSITION)) == 0 )
#define bit_is_set(PORT, POSITION)   ((PORT & (1<<POSITION)) != 0 )
#define CLR   0
#define CLR_BIT_X(addrx, mask)   (*addrx = (*addrx & ~mask))
#define DISABLE   0
#define DISABLED   0
#define ENABLE   1
#define ENABLED   1
#define FAIL   1
#define FALSE   (0==1)
#define HIGH(U16)   ((Uchar)(U16>>8))
#define htonl(a)   Le32(a)
#define htons(a)   Le16(a)
#define IN_X(addrx)   (*addrx)
#define INTEL_ALIGNMENT   LITTLE_ENDIAN
#define KO   0
#define Le16(b)
#define Le32(b)
#define LITTLE_ENDIAN
#define Long_call(addr)   ((*(void (_ConstType_*)(void))(addr))())
#define LOW(U16)   ((Uchar)U16)
#define LSB(u16)   (((U8* )&u16)[0])
#define LSB0(u32)   MSB3(u32)
#define LSB1(u32)   MSB2(u32)
#define LSB2(u32)   MSB1(u32)
#define LSB3(u32)   MSB0(u32)
#define LSW(u32)   (((U16*)&u32)[0])
#define Max(a, b)   ( (a)>(b) ? (a) : (b) )
#define Min(a, b)   ( (a)<(b) ? (a) : (b) )
#define MOTOROLA_ALIGNMENT   BIG_ENDIAN
#define MSB(u16)   (((U8* )&u16)[1])
#define MSB0(u32)   (((U8* )&u32)[3])
#define MSB1(u32)   (((U8* )&u32)[2])
#define MSB2(u32)   (((U8* )&u32)[1])
#define MSB3(u32)   (((U8* )&u32)[0])
#define MSW(u32)   (((U16*)&u32)[1])
#define ntohl(a)   htonl(a)
#define ntohs(a)   htons(a)
#define NULL   0
#define OFF   0
#define OK   1
#define ON   1
#define OUT_X(addrx, value)   (*addrx = value)
#define PASS   0
#define SET   1
#define SET_BIT_X(addrx, mask)   (*addrx = (*addrx | mask))
#define SET_SFR_BIT(sfr_reg, bit_pos, bit_val)   { sfr_reg &= ~(1<<(bit_pos)); sfr_reg |= ((bit_val)<<(bit_pos));}
#define TID_GUARD(proc)   ((__TID__ & 0x7FF0) != ((90 << 8) | ((proc) << 4)))
#define TRUE   (1==1)
#define TST_BIT_X(addrx, mask)   (*addrx & mask)
#define Upper(val, n)   ( ((val)+(n)) & ~((n)-1) )

Typedefs

typedef unsigned char Bool
typedef unsigned char Byte
typedef unsigned long int DWord
typedef float Float16
typedef int Int16
typedef long int Int32
typedef char Int8
typedef char p_uart_ptchar
typedef char r_uart_ptchar
typedef signed short S16
typedef long S32
typedef signed char S8
typedef U8 Status
typedef Bool Status_bool
typedef unsigned short U16
typedef unsigned long U32
typedef unsigned char U8
typedef unsigned char Uchar
typedef unsigned int Uint16
typedef unsigned long int Uint32
typedef unsigned char Uint8
typedef unsigned int Word


Detailed Description

This file redefines dedicated IAR EWAVR and GNU GCC keywords in order to ensure that any source file can be processed by these compilers.

Author:
Atmel Corporation: http://www.atmel.com
Support and FAQ: http://support.atmel.no/

Definition in file Applications/MC301_Bldc_Sensor_Based/compiler.h.


Define Documentation

#define _MEM_TYPE_BIT_

#define _MEM_TYPE_FAST_

#define _MEM_TYPE_MEDFAST_

#define _MEM_TYPE_MEDSLOW_

#define _MEM_TYPE_SLOW_

#define Align_down ( val,
 )     ( (val) & ~((n)-1) )

#define Align_up ( val,
 )     ( ((val)+(n)-1) & ~((n)-1) )

#define bit_is_clear ( PORT,
POSITION   )     ((PORT & (1<<POSITION)) == 0 )

#define bit_is_set ( PORT,
POSITION   )     ((PORT & (1<<POSITION)) != 0 )

#define CLR   0

#define CLR_BIT_X ( addrx,
mask   )     (*addrx = (*addrx & ~mask))

#define DISABLE   0

#define DISABLED   0

#define ENABLE   1

#define ENABLED   1

#define FAIL   1

#define FALSE   (0==1)

#define HIGH ( U16   )     ((Uchar)(U16>>8))

#define htonl (  )     Le32(a)

#define htons (  )     Le16(a)

#define IN_X ( addrx   )     (*addrx)

#define INTEL_ALIGNMENT   LITTLE_ENDIAN

#define KO   0

#define Le16 (  ) 

Value:

(  ((U16)(     (b) &   0xFF) << 8)  \
   |  (     ((U16)(b) & 0xFF00) >> 8)  \
   )

Definition at line 213 of file Applications/MC301_Bldc_Sensor_Based/compiler.h.

#define Le32 (  ) 

Value:

(  ((U32)(     (b) &       0xFF) << 24)  \
   |  ((U32)((U16)(b) &     0xFF00) <<  8)  \
   |  (     ((U32)(b) &   0xFF0000) >>  8)  \
   |  (     ((U32)(b) & 0xFF000000) >> 24)  \
   )

Definition at line 217 of file Applications/MC301_Bldc_Sensor_Based/compiler.h.

#define LITTLE_ENDIAN

#define Long_call ( addr   )     ((*(void (_ConstType_*)(void))(addr))())

#define LOW ( U16   )     ((Uchar)U16)

#define LSB ( u16   )     (((U8* )&u16)[0])

Definition at line 186 of file Applications/MC301_Bldc_Sensor_Based/compiler.h.

Referenced by ushell_task().

#define LSB0 ( u32   )     MSB3(u32)

#define LSB1 ( u32   )     MSB2(u32)

#define LSB2 ( u32   )     MSB1(u32)

#define LSB3 ( u32   )     MSB0(u32)

#define LSW ( u32   )     (((U16*)&u32)[0])

#define Max ( a,
 )     ( (a)>(b) ? (a) : (b) )

#define Min ( a,
 )     ( (a)<(b) ? (a) : (b) )

#define MOTOROLA_ALIGNMENT   BIG_ENDIAN

#define MSB ( u16   )     (((U8* )&u16)[1])

Definition at line 185 of file Applications/MC301_Bldc_Sensor_Based/compiler.h.

Referenced by ushell_task().

#define MSB0 ( u32   )     (((U8* )&u32)[3])

#define MSB1 ( u32   )     (((U8* )&u32)[2])

#define MSB2 ( u32   )     (((U8* )&u32)[1])

#define MSB3 ( u32   )     (((U8* )&u32)[0])

#define MSW ( u32   )     (((U16*)&u32)[1])

#define ntohl (  )     htonl(a)

#define ntohs (  )     htons(a)

#define NULL   0

#define OFF   0

#define OK   1

#define ON   1

#define OUT_X ( addrx,
value   )     (*addrx = value)

#define PASS   0

#define SET   1

#define SET_BIT_X ( addrx,
mask   )     (*addrx = (*addrx | mask))

#define SET_SFR_BIT ( sfr_reg,
bit_pos,
bit_val   )     { sfr_reg &= ~(1<<(bit_pos)); sfr_reg |= ((bit_val)<<(bit_pos));}

#define TID_GUARD ( proc   )     ((__TID__ & 0x7FF0) != ((90 << 8) | ((proc) << 4)))

#define TRUE   (1==1)

#define TST_BIT_X ( addrx,
mask   )     (*addrx & mask)

#define Upper ( val,
 )     ( ((val)+(n)) & ~((n)-1) )


Typedef Documentation

typedef unsigned char Bool

typedef unsigned char Byte

typedef unsigned long int DWord

typedef float Float16

typedef int Int16

typedef long int Int32

typedef char Int8

typedef char p_uart_ptchar

typedef char r_uart_ptchar

typedef signed short S16

typedef long S32

typedef signed char S8

typedef U8 Status

typedef Bool Status_bool

typedef unsigned short U16

typedef unsigned long U32

typedef unsigned char U8

typedef unsigned char Uchar

typedef unsigned int Uint16

typedef unsigned long int Uint32

typedef unsigned char Uint8

typedef unsigned int Word


Generated on Wed Oct 22 16:03:25 2008 for AVR496 : Atmel BLDC control on ATAVRMC301 with ATtiny861 by  doxygen 1.5.7.1