Home | History | Annotate | Download | only in inc
      1 /*
      2  *  Copyright 2001-2008 Texas Instruments - http://www.ti.com/
      3  *
      4  *  Licensed under the Apache License, Version 2.0 (the "License");
      5  *  you may not use this file except in compliance with the License.
      6  *  You may obtain a copy of the License at
      7  *
      8  *     http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  *  Unless required by applicable law or agreed to in writing, software
     11  *  distributed under the License is distributed on an "AS IS" BASIS,
     12  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  *  See the License for the specific language governing permissions and
     14  *  limitations under the License.
     15  */
     16 
     17 
     18 /*
     19  *  ======== dbtype.h ========
     20  *  DSP-BIOS Bridge driver support functions for TI OMAP processors.
     21  *  Description:
     22  *      This header defines data types for DSP/BIOS Bridge APIs and device
     23  *      driver modules. It also defines the Hungarian
     24  *      prefix to use for each base type.
     25  *
     26  *
     27  *! Revision History:
     28  *! =================
     29  *! 23-Nov-2002 gp: Purpose -> Description in file header.
     30  *! 13-Feb-2001 kc: Name changed from ddsptype.h dbtype.h.
     31  *! 09-Oct-2000 jeh Added CHARACTER.
     32  *! 14-Sep-2000 jeh Moved PSTRING from dspdefs.h to dbtype.h. Define
     33  *!                 DEF_WINCE_ so PSTRING gets defined.
     34  *! 11-Aug-2000 ag: Added 'typedef void VOID'.
     35  *! 08-Apr-2000 ww: Cloned.
     36  */
     37 
     38 #ifndef DBTYPE_
     39 #define DBTYPE_
     40 
     41 #ifndef DEF_LINUX_
     42 #define DEF_LINUX_
     43 #endif
     44 
     45 #ifdef DEAD_CODE
     46 /* Stifle compiler warnings: */
     47 #ifndef UNUSED_PARAMETER
     48 #define UNUSED_PARAMETER(P)   (P)
     49 #endif
     50 #endif
     51 
     52 /*============================================================================*/
     53 /*  Argument specification syntax                                             */
     54 /*============================================================================*/
     55 
     56 #ifndef IN
     57 #define IN			/* Following parameter is for input. */
     58 #endif
     59 
     60 #ifndef OUT
     61 #define OUT			/* Following parameter is for output. */
     62 #endif
     63 
     64 #ifndef OPTIONAL
     65 #define OPTIONAL		/* Function may optionally use previous parameter. */
     66 #endif
     67 
     68 #ifndef CONST
     69 #define CONST   const
     70 #endif
     71 
     72 /*============================================================================*/
     73 /*  Boolean constants                                                         */
     74 /*============================================================================*/
     75 
     76 #ifndef FALSE
     77 #define FALSE   0
     78 #endif
     79 #ifndef TRUE
     80 #define TRUE    1
     81 #endif
     82 
     83 /*============================================================================*/
     84 /*  NULL    (Definition is language specific)                                 */
     85 /*============================================================================*/
     86 
     87 #ifndef NULL
     88 #ifdef __cplusplus
     89 #define NULL    0
     90 #else
     91 #define NULL    ((void *)0)	/* Null pointer. */
     92 #endif
     93 #endif
     94 
     95 /*============================================================================*/
     96 /*  NULL character   (normally used for string termination)                   */
     97 /*============================================================================*/
     98 
     99 #ifndef NULL_CHAR
    100 #define NULL_CHAR    '\0'	/* Null character. */
    101 #endif
    102 
    103 /*============================================================================*/
    104 /*  Basic Type definitions (with Prefixes for Hungarian notation)             */
    105 /*============================================================================*/
    106 typedef unsigned char BYTE;	/* b    */
    107 
    108 typedef unsigned short WORD;	/* w    */
    109 typedef unsigned long DWORD;	/* dw   */
    110 
    111 typedef char CHAR;		/* ch   */
    112 typedef short SHORT;		/* s    */
    113 typedef int INT;		/* n    */
    114 typedef long LONG;		/* l    */
    115 
    116 typedef unsigned short USHORT;	/* us   */
    117 typedef unsigned int UINT;	/* u    */
    118 typedef unsigned long ULONG;	/* ul   */
    119 
    120 typedef double DOUBLE;		/* dbl  */
    121 
    122 typedef CHAR SZ[];		/* sz   */
    123 typedef CHAR *PSTR;		/* pstr */
    124 
    125 #ifndef OMAPBRIDGE_TYPES
    126 #define OMAPBRIDGE_TYPES
    127 
    128 typedef unsigned char UCHAR;	/* uch  */
    129 typedef float FLOAT;		/* flt  */
    130 typedef int BOOL;		/* f    */
    131 
    132 typedef volatile unsigned short REG_UWORD16;
    133 
    134 #endif
    135 
    136 #ifndef VOID
    137 #define VOID void
    138 #endif
    139 
    140 typedef VOID *PVOID;		/* p    */
    141 typedef PVOID HANDLE;		/* h    */
    142 
    143 #ifdef DEF_WINCE_
    144 /*------------------------------ WINCE ---------------------------------------*/
    145 
    146 typedef unsigned short WCHAR;	/* wch  */
    147 
    148 #if defined(UNICODE)
    149 typedef WCHAR TCHAR;
    150 #else
    151 typedef CHAR TCHAR;
    152 #endif
    153 
    154 typedef WCHAR *PWCHAR;
    155 typedef TCHAR *PSTRING;		/* Generic character string type */
    156 typedef TCHAR CHARACTER;
    157 
    158 #ifdef ERROR			/* Definition of ERROR in wingdi.h clashes with gt.h  */
    159 #undef ERROR
    160 #endif
    161 
    162 /*------------------------------ WINCE ---------------------------------------*/
    163 #endif				/* ifdef DEF_WINCE_ */
    164 
    165 #ifdef DEF_EPOC_
    166 /*------------------------------ EPOC ----------------------------------------*/
    167 
    168 /*------------------------------ EPOC ----------------------------------------*/
    169 #endif				/* ifdef DEF_EPOC_ */
    170 
    171 #ifdef DEF_LINUX_
    172 /*------------------------------ LINUX -------------------------------------*/
    173 
    174 typedef unsigned short WCHAR;	/* wch  */
    175 
    176 #if defined(UNICODE)
    177 typedef WCHAR TCHAR;
    178 #else
    179 typedef CHAR TCHAR;
    180 #endif
    181 
    182 typedef WCHAR *PWCHAR;
    183 typedef TCHAR *PSTRING;		/* Generic character string type */
    184 typedef TCHAR CHARACTER;
    185 
    186 typedef BYTE *PBYTE;		/* p    */
    187 
    188 typedef DWORD *PDWORD;		/* dw   */
    189 
    190 typedef VOID *LPVOID;		/*lp   */
    191 typedef VOID *LPCVOID;		/*lpcvoid    */
    192 
    193 typedef long long LARGE_INTEGER;
    194 #define TEXT(x) x
    195 
    196 #ifdef ERROR			/* Definition of ERROR in wingdi.h clashes with gt.h  */
    197 #undef ERROR
    198 #endif
    199 
    200 /*------------------------------ LINUX -------------------------------------*/
    201 #endif				/* ifdef DEF_LINUX_ */
    202 
    203 #ifdef DEAD_CODE
    204 /*============================================================================*/
    205 /*  Standard calling conventions                                              */
    206 /*============================================================================*/
    207 
    208 #define STATIC          static
    209 #define EXTERN          extern
    210 #endif
    211 
    212 #ifdef DEF_WINCE_
    213 /*------------------------------ WINCE ---------------------------------------*/
    214 
    215 #ifndef CDECL
    216 #define CDECL           _cdecl
    217 #endif
    218 
    219 #ifndef WINAPI
    220 #if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
    221 #define WINAPI          __stdcall
    222 #else
    223 #define WINAPI
    224 #endif
    225 #endif
    226 
    227 #define STDCALL         WINAPI
    228 
    229 #define DLLIMPORT       __declspec(dllexport)
    230 #define DLLEXPORT       __declspec(dllexport)
    231 
    232 /*------------------------------ WINCE ---------------------------------------*/
    233 #endif				/* ifdef DEF_WINCE_ */
    234 
    235 #ifdef DEF_EPOC_
    236 /*------------------------------ EPOC ----------------------------------------*/
    237 
    238 #define CDECL           __cdecl
    239 
    240 #define STDCALL
    241 
    242 #ifdef __VC32__
    243 #define DLLIMPORT       __declspec(dllexport)
    244 #define DLLEXPORT       __declspec(dllexport)
    245 #endif
    246 
    247 #ifdef __GCC32__
    248 #define DLLIMPORT
    249 #define DLLEXPORT       __declspec(dllexport)
    250 #endif
    251 
    252 /*------------------------------ EPOC ----------------------------------------*/
    253 #endif				/* ifdef DEF_EPOC_ */
    254 
    255 #ifdef DEF_LINUX_
    256 /*------------------------------ LINUX -------------------------------------*/
    257 
    258 #define CDECL
    259 
    260 #define WINAPI
    261 
    262 #define STDCALL
    263 
    264 #define DLLIMPORT
    265 #define DLLEXPORT
    266 
    267 /* Define DSPAPIDLL correctly in dspapi.h */
    268 #define _DSPSYSDLL32_
    269 
    270 /*------------------------------ LINUX -------------------------------------*/
    271 #endif				/* ifdef DEF_LINUX_ */
    272 
    273 #ifdef DEAD_CODE
    274 /*============================================================================*/
    275 /*  Derived calling conventions                                               */
    276 /*============================================================================*/
    277 
    278 #define DSPNORMALAPI    STDCALL
    279 #define DSPKERNELAPI    CDECL
    280 #define DSPEXPORTAPI    DLLEXPORT
    281 #endif
    282 
    283 #endif				/* DBTYPE_ */
    284