Freescale Semiconductor Inc.
    Regional Technical Application Center

 

Main Page | Class List | Directories | File List | File Members | Related Pages

typedefs.h

00001 /**************************************************************************
00002  * FILE NAME: $RCSfile: typedefs.h,v $       COPYRIGHT (c) Freescale 2005 *
00003  * DESCRIPTION:                                     All Rights Reserved   *
00004  * This file defines all of the data types for the Motorola header file.  *
00005  *========================================================================*
00006  * ORIGINAL AUTHOR: Jeff Loeliger (r12110)                                *
00007  * $Log: typedefs.h,v $
00008  * Revision 1.7  2007/05/02 22:46:00  dfreeland
00009  * Use latest web version
00010  *
00011  * Revision 1.4  2006/03/27 09:59:34  r47354
00012  * change __GHS__ to __ghs__. As per bug 13213
00013  *
00014  * Revision 1.3  2005/02/22 13:09:38  r47354
00015  * Fix copyright date.
00016  *
00017  * Revision 1.2  2004/11/17 12:43:12  r12110
00018  * -Removed #ifdef DEBUG from around initial comment block.
00019  *
00020  * Revision 1.1  2004/11/17 12:38:48  r12110
00021  * -Initial version checked into CVS.
00022  * -Updated copyright from Motorola to Freescale.
00023  *
00024  *........................................................................*
00025  * 0.1   J. Loeliger  17/Feb/03    Initial version of file.               *
00026  * 0.2   J. Loeliger  06/Mar/03    Added DCC support.                     *
00027  * 0.3   J. Loeliger  07/May/03    Change to fully use ISO data types.    *
00028  * 0.4   J. Loeliger  17/Jun/03    Change name to motint.h and merge      *
00029  *                                  MPC5500 and MAC7100 files.            *
00030  * 0.5   J. Loeliger  04/Nov/03    Changed name to typedefs.h.            *
00031  * 0.6   J. Loeliger  09/May/04    Changed to support GHS and GCC.        *
00032  **************************************************************************/
00033 
00034 #ifndef _TYPEDEFS_H_
00035 #define _TYPEDEFS_H_
00036 
00037 #ifdef __MWERKS__    //Metrowerk CodeWarrior
00038     #include <stdint.h>
00039 
00040     // Standard typedefs used by header files, based on ISO C standard
00041     typedef volatile int8_t vint8_t;
00042     typedef volatile uint8_t vuint8_t;
00043 
00044     typedef volatile int16_t vint16_t;
00045     typedef volatile uint16_t vuint16_t;
00046 
00047     typedef volatile int32_t vint32_t;
00048     typedef volatile uint32_t vuint32_t;
00049     typedef volatile float  float32_t;
00050     #define NULL_PTR ((void *)0)
00051 
00052 #else
00053 #ifdef __ghs__    //GreenHills
00054     #include <stdint.h>
00055 
00056     // Standard typedefs used by header files, based on ISO C standard
00057     typedef volatile int8_t vint8_t;
00058     typedef volatile uint8_t vuint8_t;
00059 
00060     typedef volatile int16_t vint16_t;
00061     typedef volatile uint16_t vuint16_t;
00062 
00063     typedef volatile int32_t vint32_t;
00064     typedef volatile uint32_t vuint32_t;
00065     typedef volatile float  float32_t;
00066     #define NULL_PTR ((void *)0)
00067 
00068 #else
00069 
00070     // This is needed for compilers that don't have a stdint.h file
00071 
00072     typedef signed char int8_t;
00073     typedef unsigned char uint8_t;
00074     typedef volatile signed char vint8_t;
00075     typedef volatile unsigned char vuint8_t;
00076 
00077     typedef signed short int16_t;
00078     typedef unsigned short uint16_t;
00079     typedef volatile signed short vint16_t;
00080     typedef volatile unsigned short vuint16_t;
00081 
00082     typedef signed int int32_t;
00083     typedef unsigned int uint32_t;
00084     typedef volatile signed int vint32_t;
00085     typedef volatile unsigned int vuint32_t;
00086     typedef volatile float  float32_t;
00087     #define NULL_PTR ((void *)0)
00088 
00089 #endif
00090 #endif
00091 #endif
00092 
00093 /*********************************************************************
00094  *
00095  * Copyright:
00096  *      Freescale Semiconductor, INC. All Rights Reserved.
00097  *  You are hereby granted a copyright license to use, modify, and
00098  *  distribute the SOFTWARE so long as this entire notice is
00099  *  retained without alteration in any modified and/or redistributed
00100  *  versions, and that such modified versions are clearly identified
00101  *  as such. No licenses are granted by implication, estoppel or
00102  *  otherwise under any patents or trademarks of Freescale
00103  *  Semiconductor, Inc. This software is provided on an "AS IS"
00104  *  basis and without warranty.
00105  *
00106  *  To the maximum extent permitted by applicable law, Freescale
00107  *  Semiconductor DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED,
00108  *  INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
00109  *  PARTICULAR PURPOSE AND ANY WARRANTY AGAINST INFRINGEMENT WITH
00110  *  REGARD TO THE SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF)
00111  *  AND ANY ACCOMPANYING WRITTEN MATERIALS.
00112  *
00113  *  To the maximum extent permitted by applicable law, IN NO EVENT
00114  *  SHALL Freescale Semiconductor BE LIABLE FOR ANY DAMAGES WHATSOEVER
00115  *  (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS,
00116  *  BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER
00117  *  PECUNIARY LOSS) ARISING OF THE USE OR INABILITY TO USE THE SOFTWARE.
00118  *
00119  *  Freescale Semiconductor assumes no responsibility for the
00120  *  maintenance and support of this software
00121  *
00122  ********************************************************************/
00123 
00124