diff options
author | Forest Bond <forest@alittletooquiet.net> | 2009-06-13 07:38:31 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 15:01:32 -0400 |
commit | 92b96797118e5836294a6d42a5a8e10b86f50e3f (patch) | |
tree | 1eceb1d70adc634da006f38c951a515de746e2c2 /drivers/staging/vt6656/ttype.h | |
parent | 36c7928c3e948cf8862d4b5c3df27c5a841cb503 (diff) |
Staging: Add pristine upstream vt6656 driver sources to drivers/staging/vt6656.
Add pristine upstream vt6656 driver sources to drivers/staging/vt6656. These
files were copied from the driver directory in the upstream source archive,
available here:
http://www.viaarena.com/Driver/VT6656_Linux_src_v1.19_12_x86.zip
After copying, trailing whitespace was stripped. This is GPL-licensed code.
Signed-off-by: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/vt6656/ttype.h')
-rw-r--r-- | drivers/staging/vt6656/ttype.h | 394 |
1 files changed, 394 insertions, 0 deletions
diff --git a/drivers/staging/vt6656/ttype.h b/drivers/staging/vt6656/ttype.h new file mode 100644 index 00000000000..c91a27384ae --- /dev/null +++ b/drivers/staging/vt6656/ttype.h | |||
@@ -0,0 +1,394 @@ | |||
1 | /* | ||
2 | * File: ttype.h | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
17 | * | ||
18 | * Purpose: define basic common types and macros | ||
19 | * | ||
20 | * Author: Tevin Chen | ||
21 | * | ||
22 | * Date: May 21, 1996 | ||
23 | * | ||
24 | */ | ||
25 | |||
26 | |||
27 | #ifndef __TTYPE_H__ | ||
28 | #define __TTYPE_H__ | ||
29 | |||
30 | |||
31 | /******* Common definitions and typedefs ***********************************/ | ||
32 | |||
33 | #ifndef VOID | ||
34 | #define VOID void | ||
35 | #endif | ||
36 | |||
37 | #ifndef CONST | ||
38 | #define CONST const | ||
39 | #endif | ||
40 | |||
41 | #ifndef STATIC | ||
42 | #define STATIC static | ||
43 | #endif | ||
44 | |||
45 | #ifndef IN | ||
46 | #define IN | ||
47 | #endif | ||
48 | |||
49 | #ifndef OUT | ||
50 | #define OUT | ||
51 | #endif | ||
52 | |||
53 | //2007-0115-04<Add>by MikeLiu | ||
54 | #ifndef TxInSleep | ||
55 | #define TxInSleep | ||
56 | #endif | ||
57 | |||
58 | |||
59 | //2007-0814-01<Add>by MikeLiu | ||
60 | #ifndef Safe_Close | ||
61 | #define Safe_Close | ||
62 | #endif | ||
63 | |||
64 | //2008-0131-01<Add>by MikeLiu | ||
65 | #ifndef Adhoc_STA | ||
66 | #define Adhoc_STA | ||
67 | #endif | ||
68 | |||
69 | #if! defined(__CPU8051) | ||
70 | typedef int BOOL; | ||
71 | typedef int BOOLEAN; | ||
72 | #else // __CPU8051 | ||
73 | #define BOOL int | ||
74 | #endif // __CPU8051 | ||
75 | |||
76 | #if !defined(TRUE) | ||
77 | #define TRUE 1 | ||
78 | #endif | ||
79 | #if !defined(FALSE) | ||
80 | #define FALSE 0 | ||
81 | #endif | ||
82 | |||
83 | |||
84 | #if !defined(SUCCESS) | ||
85 | #define SUCCESS 0 | ||
86 | #endif | ||
87 | #if !defined(FAILED) | ||
88 | #define FAILED -1 | ||
89 | #endif | ||
90 | |||
91 | //2007-0809-01<Add>by MikeLiu | ||
92 | #ifndef update_BssList | ||
93 | #define update_BssList | ||
94 | #endif | ||
95 | |||
96 | #ifndef WPA_SM_Transtatus | ||
97 | #define WPA_SM_Transtatus | ||
98 | #endif | ||
99 | |||
100 | #ifndef Calcu_LinkQual | ||
101 | #define Calcu_LinkQual | ||
102 | #endif | ||
103 | |||
104 | /****** Simple typedefs ***************************************************/ | ||
105 | |||
106 | #if! defined(__CPU8051) | ||
107 | |||
108 | /* These lines assume that your compiler's longs are 32 bits and | ||
109 | * shorts are 16 bits. It is already assumed that chars are 8 bits, | ||
110 | * but it doesn't matter if they're signed or unsigned. | ||
111 | */ | ||
112 | |||
113 | typedef signed char I8; /* 8-bit signed integer */ | ||
114 | typedef signed short I16; /* 16-bit signed integer */ | ||
115 | typedef signed long I32; /* 32-bit signed integer */ | ||
116 | |||
117 | typedef unsigned char U8; /* 8-bit unsigned integer */ | ||
118 | typedef unsigned short U16; /* 16-bit unsigned integer */ | ||
119 | typedef unsigned long U32; /* 32-bit unsigned integer */ | ||
120 | |||
121 | |||
122 | #if defined(__WIN32) | ||
123 | typedef signed __int64 I64; /* 64-bit signed integer */ | ||
124 | typedef unsigned __int64 U64; /* 64-bit unsigned integer */ | ||
125 | #endif // __WIN32 | ||
126 | |||
127 | |||
128 | typedef char CHAR; | ||
129 | typedef signed short SHORT; | ||
130 | typedef signed int INT; | ||
131 | typedef signed long LONG; | ||
132 | |||
133 | typedef unsigned char UCHAR; | ||
134 | typedef unsigned short USHORT; | ||
135 | typedef unsigned int UINT; | ||
136 | typedef unsigned long ULONG; | ||
137 | typedef unsigned long long ULONGLONG; //64 bit | ||
138 | typedef unsigned long long ULONGULONG; | ||
139 | |||
140 | |||
141 | |||
142 | typedef unsigned char BYTE; // 8-bit | ||
143 | typedef unsigned short WORD; // 16-bit | ||
144 | typedef unsigned long DWORD; // 32-bit | ||
145 | |||
146 | // QWORD is for those situation that we want | ||
147 | // an 8-byte-aligned 8 byte long structure | ||
148 | // which is NOT really a floating point number. | ||
149 | typedef union tagUQuadWord { | ||
150 | struct { | ||
151 | DWORD dwLowDword; | ||
152 | DWORD dwHighDword; | ||
153 | } u; | ||
154 | double DoNotUseThisField; | ||
155 | } UQuadWord; | ||
156 | typedef UQuadWord QWORD; // 64-bit | ||
157 | |||
158 | |||
159 | |||
160 | #ifndef _TCHAR_DEFINED | ||
161 | typedef char TCHAR; | ||
162 | typedef char* PTCHAR; | ||
163 | typedef unsigned char TBYTE; | ||
164 | typedef unsigned char* PTBYTE; | ||
165 | #define _TCHAR_DEFINED | ||
166 | #endif | ||
167 | |||
168 | #else // __CPU8051 | ||
169 | |||
170 | #define U8 unsigned char | ||
171 | #define U16 unsigned short | ||
172 | #define U32 unsigned long | ||
173 | |||
174 | #define USHORT unsigned short | ||
175 | #define UINT unsigned int | ||
176 | |||
177 | #define BYTE unsigned char | ||
178 | #define WORD unsigned short | ||
179 | #define DWORD unsigned long | ||
180 | |||
181 | |||
182 | #endif // __CPU8051 | ||
183 | |||
184 | |||
185 | // maybe this should be defined in <limits.h> | ||
186 | #define U8_MAX 0xFFU | ||
187 | #define U16_MAX 0xFFFFU | ||
188 | #define U32_MAX 0xFFFFFFFFUL | ||
189 | |||
190 | #define BYTE_MAX 0xFFU | ||
191 | #define WORD_MAX 0xFFFFU | ||
192 | #define DWORD_MAX 0xFFFFFFFFUL | ||
193 | |||
194 | |||
195 | |||
196 | |||
197 | /******* 32-bit vs. 16-bit definitions and typedefs ************************/ | ||
198 | |||
199 | #if !defined(NULL) | ||
200 | #ifdef __cplusplus | ||
201 | #define NULL 0 | ||
202 | #else | ||
203 | #define NULL ((void *)0) | ||
204 | #endif // __cplusplus | ||
205 | #endif // !NULL | ||
206 | |||
207 | |||
208 | |||
209 | |||
210 | #if defined(__WIN32) || defined(__CPU8051) | ||
211 | |||
212 | #if !defined(FAR) | ||
213 | #define FAR | ||
214 | #endif | ||
215 | #if !defined(NEAR) | ||
216 | #define NEAR | ||
217 | #endif | ||
218 | #if !defined(DEF) | ||
219 | #define DEF | ||
220 | #endif | ||
221 | #if !defined(CALLBACK) | ||
222 | #define CALLBACK | ||
223 | #endif | ||
224 | |||
225 | #else // !__WIN32__ | ||
226 | |||
227 | #if !defined(FAR) | ||
228 | #define FAR | ||
229 | #endif | ||
230 | #if !defined(NEAR) | ||
231 | #define NEAR | ||
232 | #endif | ||
233 | #if !defined(DEF) | ||
234 | // default pointer type is FAR, if you want near pointer just redefine it to NEAR | ||
235 | #define DEF | ||
236 | #endif | ||
237 | #if !defined(CALLBACK) | ||
238 | #define CALLBACK | ||
239 | #endif | ||
240 | |||
241 | #endif // !__WIN32__ | ||
242 | |||
243 | |||
244 | |||
245 | |||
246 | /****** Common pointer types ***********************************************/ | ||
247 | |||
248 | #if! defined(__CPU8051) | ||
249 | |||
250 | typedef signed char DEF* PI8; | ||
251 | typedef signed short DEF* PI16; | ||
252 | typedef signed long DEF* PI32; | ||
253 | |||
254 | typedef unsigned char DEF* PU8; | ||
255 | typedef unsigned short DEF* PU16; | ||
256 | typedef unsigned long DEF* PU32; | ||
257 | |||
258 | #if defined(__WIN32) | ||
259 | typedef signed __int64 DEF* PI64; | ||
260 | typedef unsigned __int64 DEF* PU64; | ||
261 | #endif // __WIN32 | ||
262 | |||
263 | #if !defined(_WIN64) | ||
264 | typedef unsigned long ULONG_PTR; // 32-bit | ||
265 | typedef unsigned long DWORD_PTR; // 32-bit | ||
266 | #endif // _WIN64 | ||
267 | |||
268 | |||
269 | // boolean pointer | ||
270 | typedef int DEF* PBOOL; | ||
271 | typedef int NEAR* NPBOOL; | ||
272 | typedef int FAR* LPBOOL; | ||
273 | |||
274 | typedef int DEF* PINT; | ||
275 | typedef int NEAR* NPINT; | ||
276 | typedef int FAR* LPINT; | ||
277 | typedef const int DEF* PCINT; | ||
278 | typedef const int NEAR* NPCINT; | ||
279 | typedef const int FAR* LPCINT; | ||
280 | |||
281 | typedef unsigned int DEF* PUINT; | ||
282 | typedef const unsigned int DEF* PCUINT; | ||
283 | |||
284 | typedef long DEF* PLONG; | ||
285 | typedef long NEAR* NPLONG; | ||
286 | typedef long FAR* LPLONG; | ||
287 | //typedef const long DEF* PCLONG; | ||
288 | typedef const long NEAR* NPCLONG; | ||
289 | typedef const long FAR* LPCLONG; | ||
290 | |||
291 | typedef BYTE DEF* PBYTE; | ||
292 | typedef BYTE NEAR* NPBYTE; | ||
293 | typedef BYTE FAR* LPBYTE; | ||
294 | typedef const BYTE DEF* PCBYTE; | ||
295 | typedef const BYTE NEAR* NPCBYTE; | ||
296 | typedef const BYTE FAR* LPCBYTE; | ||
297 | |||
298 | typedef WORD DEF* PWORD; | ||
299 | typedef WORD NEAR* NPWORD; | ||
300 | typedef WORD FAR* LPWORD; | ||
301 | typedef const WORD DEF* PCWORD; | ||
302 | typedef const WORD NEAR* NPCWORD; | ||
303 | typedef const WORD FAR* LPCWORD; | ||
304 | |||
305 | typedef DWORD DEF* PDWORD; | ||
306 | typedef DWORD NEAR* NPDWORD; | ||
307 | typedef DWORD FAR* LPDWORD; | ||
308 | typedef const DWORD DEF* PCDWORD; | ||
309 | typedef const DWORD NEAR* NPCDWORD; | ||
310 | typedef const DWORD FAR* LPCDWORD; | ||
311 | |||
312 | typedef QWORD DEF* PQWORD; | ||
313 | typedef QWORD NEAR* NPQWORD; | ||
314 | typedef QWORD FAR* LPQWORD; | ||
315 | typedef const QWORD DEF* PCQWORD; | ||
316 | typedef const QWORD NEAR* NPCQWORD; | ||
317 | typedef const QWORD FAR* LPCQWORD; | ||
318 | |||
319 | typedef void DEF* PVOID; | ||
320 | typedef void NEAR* NPVOID; | ||
321 | typedef void FAR* LPVOID; | ||
322 | |||
323 | // handle declaration | ||
324 | #ifdef STRICT | ||
325 | typedef void *HANDLE; | ||
326 | #else | ||
327 | typedef PVOID HANDLE; | ||
328 | #endif | ||
329 | |||
330 | // | ||
331 | // ANSI (Single-byte Character) types | ||
332 | // | ||
333 | typedef char DEF* PCH; | ||
334 | typedef char NEAR* NPCH; | ||
335 | typedef char FAR* LPCH; | ||
336 | typedef const char DEF* PCCH; | ||
337 | typedef const char NEAR* NPCCH; | ||
338 | typedef const char FAR* LPCCH; | ||
339 | |||
340 | typedef char DEF* PSTR; | ||
341 | typedef char NEAR* NPSTR; | ||
342 | typedef char FAR* LPSTR; | ||
343 | typedef const char DEF* PCSTR; | ||
344 | typedef const char NEAR* NPCSTR; | ||
345 | typedef const char FAR* LPCSTR; | ||
346 | |||
347 | #endif // !__CPU8051 | ||
348 | |||
349 | |||
350 | |||
351 | |||
352 | /****** Misc definitions, types ********************************************/ | ||
353 | |||
354 | // parameter prefix | ||
355 | #ifndef IN | ||
356 | #define IN | ||
357 | #endif | ||
358 | |||
359 | #ifndef OUT | ||
360 | #define OUT | ||
361 | #endif | ||
362 | |||
363 | |||
364 | // unreferenced parameter macro to avoid warning message in MS C | ||
365 | #if defined(__TURBOC__) | ||
366 | |||
367 | //you should use "#pragma argsused" to avoid warning message in Borland C | ||
368 | #ifndef UNREFERENCED_PARAMETER | ||
369 | #define UNREFERENCED_PARAMETER(x) | ||
370 | #endif | ||
371 | |||
372 | #else | ||
373 | |||
374 | #ifndef UNREFERENCED_PARAMETER | ||
375 | //#define UNREFERENCED_PARAMETER(x) x | ||
376 | #define UNREFERENCED_PARAMETER(x) | ||
377 | #endif | ||
378 | |||
379 | #endif | ||
380 | |||
381 | |||
382 | // in-line assembly prefix | ||
383 | #if defined(__TURBOC__) | ||
384 | #define ASM asm | ||
385 | #else // !__TURBOC__ | ||
386 | #define ASM _asm | ||
387 | #endif // !__TURBOC__ | ||
388 | |||
389 | |||
390 | |||
391 | |||
392 | #endif // __TTYPE_H__ | ||
393 | |||
394 | |||