1 /****************************************************************************
3 global project definition file
6 11.02.2002 r.d. Erweiterungen, Ergaenzungen
7 20.08.2002 SYS TEC electronic -as
8 Definition Schluesselwort 'GENERIC'
9 fuer das Erzeugen von Generic Pointer
10 28.08.2002 r.d. erweiterter SYS TEC Debug Code
11 16.09.2002 r.d. komplette Uebersetzung in Englisch
12 11.04.2003 f.j. Ergaenzung fuer Mitsubishi NC30 Compiler
13 17.06.2003 -rs Definition von Basistypen in <#ifndef _WINDEF_> gesetzt
14 16.04.2004 r.d. Ergaenzung fuer Borland C++ Builder
15 30.08.2004 -rs TRACE5 eingefügt
16 23.12.2005 d.k. Definitions for IAR compiler
18 $Id: global.h,v 1.6 2008/11/07 13:55:56 D.Krueger Exp $
20 ****************************************************************************/
27 #define QWORD long long int
30 // ------------------ GNUC for I386 ---------------------------------------------
32 #define ROM // code or variables mapped to ROM (i.e. flash)
33 // usage: CONST BYTE ROM foo = 0x00;
34 #define HWACC // hardware access through external memory (i.e. CAN)
36 // These types can be adjusted by users to match application requirements. The goal is to
37 // minimize code memory and maximize speed.
38 #define GENERIC // generic pointer to point to application data
39 // Variables with this attribute can be located in external
40 // or internal data memory.
41 #define MEM // Memory attribute to optimize speed and code of pointer access.
44 #define NEAR // variables mapped to internal data storage location
48 #define FAR // variables mapped to external data storage location
52 #define CONST const // variables mapped to ROM (i.e. flash)
60 #define SHORT short int
63 #define USHORT unsigned short int
69 #define UINT unsigned int
75 #define ULONG unsigned long int
77 // --- logic types ---
79 #define BYTE unsigned char
82 #define WORD unsigned short int
85 #define DWORD unsigned long int
88 #define BOOL unsigned char
90 // --- alias types ---
97 #ifndef _TIME_OF_DAY_DEFINED_
99 unsigned long int m_dwMs;
100 unsigned short int m_wDays;
104 #define _TIME_OF_DAY_DEFINED_
108 //---------------------------------------------------------------------------
109 // Definition von TRACE
110 //---------------------------------------------------------------------------
115 #define TRACE0(p0) TRACE(p0)
119 #define TRACE1(p0, p1) TRACE(p0, p1)
123 #define TRACE2(p0, p1, p2) TRACE(p0, p1, p2)
127 #define TRACE3(p0, p1, p2, p3) TRACE(p0, p1, p2, p3)
131 #define TRACE4(p0, p1, p2, p3, p4) TRACE(p0, p1, p2, p3, p4)
135 #define TRACE5(p0, p1, p2, p3, p4, p5) TRACE(p0, p1, p2, p3, p4, p5)
139 #define TRACE6(p0, p1, p2, p3, p4, p5, p6) TRACE(p0, p1, p2, p3, p4, p5, p6)
149 #define TRACE1(p0, p1)
153 #define TRACE2(p0, p1, p2)
157 #define TRACE3(p0, p1, p2, p3)
161 #define TRACE4(p0, p1, p2, p3, p4)
165 #define TRACE5(p0, p1, p2, p3, p4, p5)
169 #define TRACE6(p0, p1, p2, p3, p4, p5, p6)
174 //---------------------------------------------------------------------------
175 // definition of ASSERT
176 //---------------------------------------------------------------------------
182 //---------------------------------------------------------------------------
183 // SYS TEC extensions
184 //---------------------------------------------------------------------------
186 // This macro doesn't print out C-file and line number of the failed assertion
187 // but a string, which exactly names the mistake.
190 #define ASSERTMSG(expr,string) if (!(expr)) {\
191 PRINTF0 ("Assertion failed: " string );\
194 #define ASSERTMSG(expr,string)
197 //---------------------------------------------------------------------------
199 #endif // #ifndef _GLOBAL_H_
201 // Please keep an empty line at the end of this file.