Main Page   Data Structures   File List   Data Fields   Globals  

/avrlibtypes.h

Go to the documentation of this file.
00001 /*! \file avrlibtypes.h \brief AVRlib global types and typedefines. */
00002 //*****************************************************************************
00003 //
00004 // File Name    : 'avrlibtypes.h'
00005 // Title        : AVRlib global types and typedefines include file
00006 // Author       : Pascal Stang
00007 // Created      : 7/12/2001
00008 // Revised      : 9/30/2002
00009 // Version      : 1.0
00010 // Target MCU   : Atmel AVR series
00011 // Editor Tabs  : 4
00012 //
00013 //  Description : Type-defines required and used by AVRlib.  Most types are also
00014 //                      generally useful.
00015 //
00016 // This code is distributed under the GNU Public License
00017 //      which can be found at http://www.gnu.org/licenses/gpl.txt
00018 //
00019 //*****************************************************************************
00020 
00021 
00022 #ifndef AVRLIBTYPES_H
00023 #define AVRLIBTYPES_H
00024 
00025 #ifndef WIN32
00026     // true/false defines
00027     #define FALSE   0
00028     #define TRUE    -1
00029 #endif
00030 
00031 // datatype definitions macros
00032 typedef unsigned char  u08;
00033 typedef   signed char  s08;
00034 typedef unsigned short u16;
00035 typedef   signed short s16;
00036 typedef unsigned long  u32;
00037 typedef   signed long  s32;
00038 typedef unsigned long long u64;
00039 typedef   signed long long s64;
00040 
00041 // maximum value that can be held
00042 // by unsigned data types (8,16,32bits)
00043 #define MAX_U08 255
00044 #define MAX_U16 65535
00045 #define MAX_U32 4294967295
00046 
00047 // maximum values that can be held
00048 // by signed data types (8,16,32bits)
00049 #define MIN_S08 -128
00050 #define MAX_S08 127
00051 #define MIN_S16 -32768
00052 #define MAX_S16 32767
00053 #define MIN_S32 -2147483648
00054 #define MAX_S32 2147483647
00055 
00056 #ifndef WIN32
00057     // more type redefinitions
00058     typedef unsigned char   BOOL;
00059     typedef unsigned char   BYTE;
00060     typedef unsigned int    WORD;
00061     typedef unsigned long   DWORD;
00062 
00063     typedef unsigned char   UCHAR;
00064     typedef unsigned int    UINT;
00065     typedef unsigned short  USHORT;
00066     typedef unsigned long   ULONG;
00067 
00068     typedef char  CHAR;
00069     typedef int   INT;
00070     typedef long  LONG;
00071 #endif
00072 
00073 #endif

Generated on Fri Aug 1 10:42:40 2003 for Procyon AVRlib by doxygen1.2.18