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