Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

gpptypes.h

Go to the documentation of this file.
00001 /** ============================================================================
00002  *  @file   gpptypes.h
00003  *
00004  *  @path   $(DSPLINK)/gpp/inc/usr/
00005  *
00006  *  @brief  Defines the type system for DSP/BIOS Link
00007  *
00008  *  @ver    1.65.00.03
00009  *  ============================================================================
00010  *  @copyright Copyright (C) 2002-2009, Texas Instruments Incorporated -
00011  *  http://www.ti.com/
00012  *
00013  *  Redistribution and use in source and binary forms, with or without
00014  *  modification, are permitted provided that the following conditions
00015  *  are met:
00016  *  
00017  *  *  Redistributions of source code must retain the above copyright
00018  *     notice, this list of conditions and the following disclaimer.
00019  *  
00020  *  *  Redistributions in binary form must reproduce the above copyright
00021  *     notice, this list of conditions and the following disclaimer in the
00022  *     documentation and/or other materials provided with the distribution.
00023  *  
00024  *  *  Neither the name of Texas Instruments Incorporated nor the names of
00025  *     its contributors may be used to endorse or promote products derived
00026  *     from this software without specific prior written permission.
00027  *  
00028  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00029  *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00030  *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00031  *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00032  *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00033  *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00034  *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00035  *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00036  *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00037  *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
00038  *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00039  *  ============================================================================
00040  */
00041 
00042 
00043 #if !defined (GPPTYPES_H)
00044 #define GPPTYPES_H
00045 
00046 
00047 #if defined (__cplusplus)
00048 extern "C" {
00049 #endif /* defined (__cplusplus) */
00050 
00051 #if defined  xdc_target__
00052 #include <xdc/std.h>
00053 #endif
00054 
00055 /** ============================================================================
00056  *  @macro  IN/OUT/OPTIONAL/CONST
00057  *
00058  *  @brief  Argument specification syntax
00059  *  ============================================================================
00060  */
00061 #define IN                              /* The argument is INPUT  only */
00062 #define OUT                             /* The argument is OUTPUT only */
00063 #define CONST   const
00064 
00065 /** ============================================================================
00066  *  @macro  USES
00067  *
00068  *  @brief  Empty macro to indicate header file dependency
00069  *  ============================================================================
00070  */
00071 #define USES(filename)
00072 
00073 
00074 /** ============================================================================
00075  *  @macro  Data types
00076  *
00077  *  @brief  Basic data types
00078  *  ============================================================================
00079  */
00080 #if defined  xdc_target__
00081 #else
00082 typedef signed char         Int8 ;      /*  8 bit value */
00083 #endif
00084 
00085 
00086 #if defined  xdc_target__
00087 #else
00088 typedef signed short int    Int16 ;     /* 16 bit value */
00089 #endif
00090 #if defined  xdc_target__
00091 #else
00092 typedef signed long  int    Int32 ;     /* 32 bit value */
00093 #endif
00094 
00095 #if defined  xdc_target__
00096 #else
00097 typedef unsigned char       Uint8 ;     /*  8 bit value */
00098 #endif
00099 #if defined  xdc_target__
00100 #else
00101 typedef unsigned short int  Uint16 ;    /* 16 bit value */
00102 #endif
00103 #if defined  xdc_target__
00104 #else
00105 typedef unsigned long  int  Uint32 ;    /* 32 bit value */
00106 #endif
00107 
00108 typedef float               Real32 ;    /* 32 bit value */
00109 typedef double              Real64 ;    /* 64 bit value */
00110 
00111 #if defined  xdc_target__
00112 #else
00113 typedef short int           Bool ;      /* 16 bit value */
00114 #endif
00115 
00116 typedef char                Char8 ;     /*  8 bit value */
00117 typedef short               Char16 ;    /* 16 bit value */
00118 
00119 typedef unsigned char       Uchar8 ;    /*  8 bit value */
00120 typedef unsigned short      Uchar16 ;   /* 16 bit value */
00121 
00122 /* TBD resolve this with hal_psc.c */
00123 #if defined  xdc_target__
00124 #else
00125 typedef int                 Int ;
00126 #endif
00127 
00128 #if defined  xdc_target__
00129 #else
00130 #define Void                void
00131 #endif
00132 typedef void *              Pvoid ;
00133 
00134 typedef Char8 *             Pstr ;
00135 typedef Uchar8 *            Pustr ;
00136 
00137 
00138 /** ============================================================================
00139  *  @const  TRUE/FALSE
00140  *
00141  *  @brief  Boolean constants
00142  *  ============================================================================
00143  */
00144 #if !defined (FALSE)
00145 #define FALSE   0u
00146 #endif
00147 
00148 #if !defined (TRUE)
00149 #define TRUE    1u
00150 #endif
00151 
00152 
00153 /** ============================================================================
00154  *  @const  NULL
00155  *
00156  *  @brief  Definition is language specific
00157  *  ============================================================================
00158  */
00159 #if !defined (NULL)
00160 
00161 #if defined (__cplusplus)
00162 #define NULL    0u
00163 #else  /* defined (__cplusplus) */
00164 #define NULL ((void *)0)
00165 #endif /* defined (__cplusplus) */
00166 
00167 #endif /* !defined (NULL) */
00168 
00169 
00170 /** ============================================================================
00171  *  @const  NULL_CHAR
00172  *
00173  *  @brief  String terminator.
00174  *  ============================================================================
00175  */
00176 #define NULL_CHAR '\0'
00177 
00178 
00179 /** ============================================================================
00180  *  @macro  REG8/REG16/REG32
00181  *
00182  *  @brief  Macros to access register fields.
00183  *  ============================================================================
00184  */
00185 #define REG8(A)         (*(volatile Char8  *) (A))
00186 #define REG16(A)        (*(volatile Uint16 *) (A))
00187 #define REG32(A)        (*(volatile Uint32 *) (A))
00188 
00189 
00190 /** ============================================================================
00191  *  @macro  DSP/BIOS Link specific types
00192  *
00193  *  @brief  These types are used across DSP/BIOS Link.
00194  *  ============================================================================
00195  */
00196 typedef Uint32     ProcessorId ;
00197 typedef Uint32     ChannelId ;
00198 
00199 
00200 /** ============================================================================
00201  *  @name   PoolId
00202  *
00203  *  @brief  This type is used for identifying the different pools used by
00204  *          DSPLINK.
00205  *  ============================================================================
00206  */
00207 typedef Uint16     PoolId ;
00208 
00209 
00210 /** ============================================================================
00211  *  @macro  OS Specific standard definitions
00212  *
00213  *  @brief  Free for OEMs to add their own generic stuff, if they so desire
00214  *  ============================================================================
00215  */
00216 #if defined (OS_WINCE)
00217 
00218 #endif  /* defined (OS_WINCE) */
00219 
00220 
00221 #if defined (OS_NUCLEUS)
00222 
00223 #endif  /* defined (OS_NUCLEUS) */
00224 
00225 
00226 #if defined (OS_LINUX)
00227 
00228 #endif  /* defined (OS_LINUX) */
00229 
00230 
00231 /** ============================================================================
00232  *  @macro  Calling convention
00233  *
00234  *  @brief  Definition of CDECL, DLLIMPORT, DLLEXPORT can be defined by
00235  *          OEM for his compiler
00236  *  ============================================================================
00237  */
00238 #define STATIC          static
00239 #define EXTERN          extern
00240 
00241 
00242 #if defined (OS_WINCE)
00243 /*  ------------------------------------------- WINCE               */
00244 #define CDECL           
00245 #define DLLIMPORT       __declspec (dllimport)
00246 #define DLLEXPORT       __declspec (dllexport)
00247 /*  ------------------------------------------- WINCE               */
00248 #endif  /* defined (OS_WINCE) */
00249 
00250 
00251 #if defined (OS_NUCLEUS)
00252 /*  ------------------------------------------- NUCLEUS             */
00253 #define CDECL
00254 #define DLLIMPORT
00255 #define DLLEXPORT
00256 /*  ------------------------------------------- NUCLEUS             */
00257 #endif  /* defined (OS_NUCLEUS) */
00258 
00259 #if defined (OS_LINUX)
00260 /*  ------------------------------------------- LINUX               */
00261 #define CDECL
00262 #define DLLIMPORT
00263 #define DLLEXPORT
00264 /*  ------------------------------------------- LINUX               */
00265 #endif  /* defined (OS_LINUX) */
00266 
00267 
00268 #if defined (OS_PROS)
00269 /*  ------------------------------------------- PROS                */
00270 #define CDECL
00271 #define DLLIMPORT
00272 #define DLLEXPORT
00273 /*  ------------------------------------------- PROS                */
00274 #endif  /* defined (OS_PROS) */
00275 
00276 /* Derived calling conventions */
00277 #define NORMAL_API      CDECL
00278 #define IMPORT_API      DLLIMPORT
00279 #define EXPORT_API      DLLEXPORT
00280 
00281 
00282 #if defined (__cplusplus)
00283 }
00284 #endif /* defined (__cplusplus) */
00285 
00286 #endif  /* !defined (GPPTYPES_H) */

Generated on Fri Jul 16 14:34:02 2010 for DSP/BIOSLink by  doxygen 1.4.4