Staging: epl: remove NEAR
[firewire-audio.git] / drivers / staging / epl / global.h
blob8a204ac232c3b42e6aaabd7fb748d17893751821
1 /****************************************************************************
3 global project definition file
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
18 $Id: global.h,v 1.6 2008/11/07 13:55:56 D.Krueger Exp $
20 ****************************************************************************/
22 #ifndef _GLOBAL_H_
23 #define _GLOBAL_H_
26 #ifndef QWORD
27 #define QWORD long long int
28 #endif
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 #define MEM // Memory attribute to optimize speed and code of pointer access.
38 #ifndef FAR
39 #define FAR // variables mapped to external data storage location
40 #endif
42 #ifndef CONST
43 #define CONST const // variables mapped to ROM (i.e. flash)
44 #endif
46 #define REENTRANT
48 #define TRACE printk
50 #ifndef SHORT
51 #define SHORT short int
52 #endif
53 #ifndef USHORT
54 #define USHORT unsigned short int
55 #endif
56 #ifndef INT
57 #define INT int
58 #endif
59 #ifndef UINT
60 #define UINT unsigned int
61 #endif
62 #ifndef LONG
63 #define LONG long int
64 #endif
65 #ifndef ULONG
66 #define ULONG unsigned long int
67 #endif
68 // --- logic types ---
69 #ifndef BYTE
70 #define BYTE unsigned char
71 #endif
72 #ifndef WORD
73 #define WORD unsigned short int
74 #endif
75 #ifndef DWORD
76 #define DWORD unsigned long int
77 #endif
78 #ifndef BOOL
79 #define BOOL unsigned char
80 #endif
81 // --- alias types ---
82 #ifndef TRUE
83 #define TRUE 0xFF
84 #endif
85 #ifndef FALSE
86 #define FALSE 0x00
87 #endif
88 #ifndef _TIME_OF_DAY_DEFINED_
89 typedef struct {
90 unsigned long int m_dwMs;
91 unsigned short int m_wDays;
93 } tTimeOfDay;
95 #define _TIME_OF_DAY_DEFINED_
97 #endif
99 //---------------------------------------------------------------------------
100 // Definition von TRACE
101 //---------------------------------------------------------------------------
103 #ifndef NDEBUG
105 #ifndef TRACE0
106 #define TRACE0(p0) TRACE(p0)
107 #endif
109 #ifndef TRACE1
110 #define TRACE1(p0, p1) TRACE(p0, p1)
111 #endif
113 #ifndef TRACE2
114 #define TRACE2(p0, p1, p2) TRACE(p0, p1, p2)
115 #endif
117 #ifndef TRACE3
118 #define TRACE3(p0, p1, p2, p3) TRACE(p0, p1, p2, p3)
119 #endif
121 #ifndef TRACE4
122 #define TRACE4(p0, p1, p2, p3, p4) TRACE(p0, p1, p2, p3, p4)
123 #endif
125 #ifndef TRACE5
126 #define TRACE5(p0, p1, p2, p3, p4, p5) TRACE(p0, p1, p2, p3, p4, p5)
127 #endif
129 #ifndef TRACE6
130 #define TRACE6(p0, p1, p2, p3, p4, p5, p6) TRACE(p0, p1, p2, p3, p4, p5, p6)
131 #endif
133 #else
135 #ifndef TRACE0
136 #define TRACE0(p0)
137 #endif
139 #ifndef TRACE1
140 #define TRACE1(p0, p1)
141 #endif
143 #ifndef TRACE2
144 #define TRACE2(p0, p1, p2)
145 #endif
147 #ifndef TRACE3
148 #define TRACE3(p0, p1, p2, p3)
149 #endif
151 #ifndef TRACE4
152 #define TRACE4(p0, p1, p2, p3, p4)
153 #endif
155 #ifndef TRACE5
156 #define TRACE5(p0, p1, p2, p3, p4, p5)
157 #endif
159 #ifndef TRACE6
160 #define TRACE6(p0, p1, p2, p3, p4, p5, p6)
161 #endif
163 #endif
165 //---------------------------------------------------------------------------
166 // definition of ASSERT
167 //---------------------------------------------------------------------------
169 #ifndef ASSERT
170 #define ASSERT(p)
171 #endif
173 //---------------------------------------------------------------------------
174 // SYS TEC extensions
175 //---------------------------------------------------------------------------
177 // This macro doesn't print out C-file and line number of the failed assertion
178 // but a string, which exactly names the mistake.
179 #ifndef NDEBUG
181 #define ASSERTMSG(expr,string) if (!(expr)) {\
182 PRINTF0 ("Assertion failed: " string );\
183 while (1);}
184 #else
185 #define ASSERTMSG(expr,string)
186 #endif
188 //---------------------------------------------------------------------------
190 #endif // #ifndef _GLOBAL_H_
192 // Please keep an empty line at the end of this file.