aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6656/ttype.h
diff options
context:
space:
mode:
authorForest Bond <forest@alittletooquiet.net>2009-06-13 07:38:31 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-15 15:01:32 -0400
commit92b96797118e5836294a6d42a5a8e10b86f50e3f (patch)
tree1eceb1d70adc634da006f38c951a515de746e2c2 /drivers/staging/vt6656/ttype.h
parent36c7928c3e948cf8862d4b5c3df27c5a841cb503 (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.h394
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)
70typedef int BOOL;
71typedef 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
113typedef signed char I8; /* 8-bit signed integer */
114typedef signed short I16; /* 16-bit signed integer */
115typedef signed long I32; /* 32-bit signed integer */
116
117typedef unsigned char U8; /* 8-bit unsigned integer */
118typedef unsigned short U16; /* 16-bit unsigned integer */
119typedef unsigned long U32; /* 32-bit unsigned integer */
120
121
122#if defined(__WIN32)
123typedef signed __int64 I64; /* 64-bit signed integer */
124typedef unsigned __int64 U64; /* 64-bit unsigned integer */
125#endif // __WIN32
126
127
128typedef char CHAR;
129typedef signed short SHORT;
130typedef signed int INT;
131typedef signed long LONG;
132
133typedef unsigned char UCHAR;
134typedef unsigned short USHORT;
135typedef unsigned int UINT;
136typedef unsigned long ULONG;
137typedef unsigned long long ULONGLONG; //64 bit
138typedef unsigned long long ULONGULONG;
139
140
141
142typedef unsigned char BYTE; // 8-bit
143typedef unsigned short WORD; // 16-bit
144typedef 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.
149typedef union tagUQuadWord {
150 struct {
151 DWORD dwLowDword;
152 DWORD dwHighDword;
153 } u;
154 double DoNotUseThisField;
155} UQuadWord;
156typedef UQuadWord QWORD; // 64-bit
157
158
159
160#ifndef _TCHAR_DEFINED
161typedef char TCHAR;
162typedef char* PTCHAR;
163typedef unsigned char TBYTE;
164typedef 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
250typedef signed char DEF* PI8;
251typedef signed short DEF* PI16;
252typedef signed long DEF* PI32;
253
254typedef unsigned char DEF* PU8;
255typedef unsigned short DEF* PU16;
256typedef unsigned long DEF* PU32;
257
258#if defined(__WIN32)
259typedef signed __int64 DEF* PI64;
260typedef unsigned __int64 DEF* PU64;
261#endif // __WIN32
262
263#if !defined(_WIN64)
264typedef unsigned long ULONG_PTR; // 32-bit
265typedef unsigned long DWORD_PTR; // 32-bit
266#endif // _WIN64
267
268
269// boolean pointer
270typedef int DEF* PBOOL;
271typedef int NEAR* NPBOOL;
272typedef int FAR* LPBOOL;
273
274typedef int DEF* PINT;
275typedef int NEAR* NPINT;
276typedef int FAR* LPINT;
277typedef const int DEF* PCINT;
278typedef const int NEAR* NPCINT;
279typedef const int FAR* LPCINT;
280
281typedef unsigned int DEF* PUINT;
282typedef const unsigned int DEF* PCUINT;
283
284typedef long DEF* PLONG;
285typedef long NEAR* NPLONG;
286typedef long FAR* LPLONG;
287//typedef const long DEF* PCLONG;
288typedef const long NEAR* NPCLONG;
289typedef const long FAR* LPCLONG;
290
291typedef BYTE DEF* PBYTE;
292typedef BYTE NEAR* NPBYTE;
293typedef BYTE FAR* LPBYTE;
294typedef const BYTE DEF* PCBYTE;
295typedef const BYTE NEAR* NPCBYTE;
296typedef const BYTE FAR* LPCBYTE;
297
298typedef WORD DEF* PWORD;
299typedef WORD NEAR* NPWORD;
300typedef WORD FAR* LPWORD;
301typedef const WORD DEF* PCWORD;
302typedef const WORD NEAR* NPCWORD;
303typedef const WORD FAR* LPCWORD;
304
305typedef DWORD DEF* PDWORD;
306typedef DWORD NEAR* NPDWORD;
307typedef DWORD FAR* LPDWORD;
308typedef const DWORD DEF* PCDWORD;
309typedef const DWORD NEAR* NPCDWORD;
310typedef const DWORD FAR* LPCDWORD;
311
312typedef QWORD DEF* PQWORD;
313typedef QWORD NEAR* NPQWORD;
314typedef QWORD FAR* LPQWORD;
315typedef const QWORD DEF* PCQWORD;
316typedef const QWORD NEAR* NPCQWORD;
317typedef const QWORD FAR* LPCQWORD;
318
319typedef void DEF* PVOID;
320typedef void NEAR* NPVOID;
321typedef void FAR* LPVOID;
322
323// handle declaration
324#ifdef STRICT
325typedef void *HANDLE;
326#else
327typedef PVOID HANDLE;
328#endif
329
330//
331// ANSI (Single-byte Character) types
332//
333typedef char DEF* PCH;
334typedef char NEAR* NPCH;
335typedef char FAR* LPCH;
336typedef const char DEF* PCCH;
337typedef const char NEAR* NPCCH;
338typedef const char FAR* LPCCH;
339
340typedef char DEF* PSTR;
341typedef char NEAR* NPSTR;
342typedef char FAR* LPSTR;
343typedef const char DEF* PCSTR;
344typedef const char NEAR* NPCSTR;
345typedef 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