Staging: epl: remove MEM
[safe/jmp/linux-2.6] / drivers / staging / epl / global.h
1 /****************************************************************************
2
3     global project definition file
4
5     12.06.1998   -rs
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
17
18     $Id: global.h,v 1.6 2008/11/07 13:55:56 D.Krueger Exp $
19
20 ****************************************************************************/
21
22 #ifndef _GLOBAL_H_
23 #define _GLOBAL_H_
24
25
26 #ifndef QWORD
27 #define QWORD long long int
28 #endif
29
30 #ifndef CONST
31 #define CONST const             // variables mapped to ROM (i.e. flash)
32 #endif
33
34 #define REENTRANT
35
36 #define TRACE  printk
37
38 #ifndef SHORT
39 #define SHORT short int
40 #endif
41 #ifndef USHORT
42 #define USHORT unsigned short int
43 #endif
44 #ifndef INT
45 #define INT int
46 #endif
47 #ifndef UINT
48 #define UINT unsigned int
49 #endif
50 #ifndef LONG
51 #define LONG long int
52 #endif
53 #ifndef ULONG
54 #define ULONG unsigned long int
55 #endif
56     // --- logic types ---
57 #ifndef BYTE
58 #define BYTE unsigned char
59 #endif
60 #ifndef WORD
61 #define WORD unsigned short int
62 #endif
63 #ifndef DWORD
64 #define DWORD unsigned long int
65 #endif
66 #ifndef BOOL
67 #define BOOL unsigned char
68 #endif
69     // --- alias types ---
70 #ifndef TRUE
71 #define TRUE  0xFF
72 #endif
73 #ifndef FALSE
74 #define FALSE 0x00
75 #endif
76 #ifndef _TIME_OF_DAY_DEFINED_
77 typedef struct {
78         unsigned long int m_dwMs;
79         unsigned short int m_wDays;
80
81 } tTimeOfDay;
82
83 #define _TIME_OF_DAY_DEFINED_
84
85 #endif
86
87 //---------------------------------------------------------------------------
88 //  Definition von TRACE
89 //---------------------------------------------------------------------------
90
91 #ifndef NDEBUG
92
93 #ifndef TRACE0
94 #define TRACE0(p0)                      TRACE(p0)
95 #endif
96
97 #ifndef TRACE1
98 #define TRACE1(p0, p1)                  TRACE(p0, p1)
99 #endif
100
101 #ifndef TRACE2
102 #define TRACE2(p0, p1, p2)              TRACE(p0, p1, p2)
103 #endif
104
105 #ifndef TRACE3
106 #define TRACE3(p0, p1, p2, p3)          TRACE(p0, p1, p2, p3)
107 #endif
108
109 #ifndef TRACE4
110 #define TRACE4(p0, p1, p2, p3, p4)      TRACE(p0, p1, p2, p3, p4)
111 #endif
112
113 #ifndef TRACE5
114 #define TRACE5(p0, p1, p2, p3, p4, p5)  TRACE(p0, p1, p2, p3, p4, p5)
115 #endif
116
117 #ifndef TRACE6
118 #define TRACE6(p0, p1, p2, p3, p4, p5, p6)  TRACE(p0, p1, p2, p3, p4, p5, p6)
119 #endif
120
121 #else
122
123 #ifndef TRACE0
124 #define TRACE0(p0)
125 #endif
126
127 #ifndef TRACE1
128 #define TRACE1(p0, p1)
129 #endif
130
131 #ifndef TRACE2
132 #define TRACE2(p0, p1, p2)
133 #endif
134
135 #ifndef TRACE3
136 #define TRACE3(p0, p1, p2, p3)
137 #endif
138
139 #ifndef TRACE4
140 #define TRACE4(p0, p1, p2, p3, p4)
141 #endif
142
143 #ifndef TRACE5
144 #define TRACE5(p0, p1, p2, p3, p4, p5)
145 #endif
146
147 #ifndef TRACE6
148 #define TRACE6(p0, p1, p2, p3, p4, p5, p6)
149 #endif
150
151 #endif
152
153 //---------------------------------------------------------------------------
154 //  definition of ASSERT
155 //---------------------------------------------------------------------------
156
157 #ifndef ASSERT
158 #define ASSERT(p)
159 #endif
160
161 //---------------------------------------------------------------------------
162 //  SYS TEC extensions
163 //---------------------------------------------------------------------------
164
165 // This macro doesn't print out C-file and line number of the failed assertion
166 // but a string, which exactly names the mistake.
167 #ifndef NDEBUG
168
169 #define ASSERTMSG(expr,string)  if (!(expr)) {\
170                                         PRINTF0 ("Assertion failed: " string );\
171                                         while (1);}
172 #else
173 #define ASSERTMSG(expr,string)
174 #endif
175
176 //---------------------------------------------------------------------------
177
178 #endif // #ifndef _GLOBAL_H_
179
180 // Please keep an empty line at the end of this file.