xref: /wlan-driver/fw-api/hw/peach/v2/com_dtypes.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 #ifndef COM_DTYPES_H
17 #define COM_DTYPES_H
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 #ifdef T_WINNT
24    #ifndef WIN32
25       #define WIN32
26    #endif
27    #include <stdlib.h>
28 #endif
29 
30 #ifdef TRUE
31 #undef TRUE
32 #endif
33 
34 #ifdef FALSE
35 #undef FALSE
36 #endif
37 
38 #define TRUE   1
39 #define FALSE  0
40 
41 #define  ON   1
42 #define  OFF  0
43 
44 #ifndef NULL
45   #define NULL  0
46 #endif
47 
48 #ifndef _ARM_ASM_
49 #ifndef _BOOLEAN_DEFINED
50 
51 typedef  unsigned char      boolean;
52 #define _BOOLEAN_DEFINED
53 #endif
54 
55 #if defined(DALSTDDEF_H)
56 #define _BOOLEAN_DEFINED
57 #define _UINT32_DEFINED
58 #define _UINT16_DEFINED
59 #define _UINT8_DEFINED
60 #define _INT32_DEFINED
61 #define _INT16_DEFINED
62 #define _INT8_DEFINED
63 #define _UINT64_DEFINED
64 #define _INT64_DEFINED
65 #define _BYTE_DEFINED
66 #endif
67 
68 #ifndef _UINT32_DEFINED
69 
70 typedef  unsigned int  uint32;
71 #define _UINT32_DEFINED
72 #endif
73 
74 #ifndef _UINT16_DEFINED
75 
76 typedef  unsigned short     uint16;
77 #define _UINT16_DEFINED
78 #endif
79 
80 #ifndef _UINT8_DEFINED
81 
82 typedef  unsigned char      uint8;
83 #define _UINT8_DEFINED
84 #endif
85 
86 #ifndef _INT32_DEFINED
87 
88 typedef  signed int    int32;
89 #define _INT32_DEFINED
90 #endif
91 
92 #ifndef _INT16_DEFINED
93 
94 typedef  signed short       int16;
95 #define _INT16_DEFINED
96 #endif
97 
98 #ifndef _INT8_DEFINED
99 
100 typedef  signed char        int8;
101 #define _INT8_DEFINED
102 #endif
103 
104 #ifndef _BYTE_DEFINED
105 
106 typedef  unsigned char      byte;
107 #define  _BYTE_DEFINED
108 #endif
109 
110 typedef  unsigned short     word;
111 
112 typedef  unsigned long      dword;
113 
114 typedef  unsigned char      uint1;
115 
116 typedef  unsigned short     uint2;
117 
118 typedef  unsigned long      uint4;
119 
120 typedef  signed char        int1;
121 
122 typedef  signed short       int2;
123 
124 typedef  long int           int4;
125 
126 typedef  signed long        sint31;
127 
128 typedef  signed short       sint15;
129 
130 typedef  signed char        sint7;
131 
132 typedef uint16 UWord16 ;
133 typedef uint32 UWord32 ;
134 typedef int32  Word32 ;
135 typedef int16  Word16 ;
136 typedef uint8  UWord8 ;
137 typedef int8   Word8 ;
138 typedef int32  Vect32 ;
139 
140 #if (! defined T_WINNT) && (! defined __GNUC__)
141 
142   #ifndef _INT64_DEFINED
143 
144     typedef long long     int64;
145     #define _INT64_DEFINED
146   #endif
147   #ifndef _UINT64_DEFINED
148 
149     typedef  unsigned long long  uint64;
150     #define _UINT64_DEFINED
151   #endif
152 #else
153 
154   #if (defined __GNUC__)
155     #ifndef _INT64_DEFINED
156       typedef long long           int64;
157       #define _INT64_DEFINED
158     #endif
159     #ifndef _UINT64_DEFINED
160       typedef unsigned long long  uint64;
161       #define _UINT64_DEFINED
162     #endif
163   #else
164     typedef  __int64              int64;
165     #ifndef _UINT64_DEFINED
166       typedef  unsigned __int64   uint64;
167       #define _UINT64_DEFINED
168     #endif
169   #endif
170 #endif
171 
172 #endif
173 
174 #ifdef __cplusplus
175 }
176 #endif
177 
178 #endif
179