/******************************************************************************* NAME $RCSfile: commTypes.h,v $ SUMMARY Diagnostic types header file for PikesPeak VERSION $Revision: 1.3 $ UPDATE DATE $Date: 2009/07/14 06:39:08 $ PROGRAMMER $Author: lecter $ Copyright 2009 LSI Corporation. All Rights Reserved. DESCRIPTION: Contains the diagnostic types of all the component. REFERENCE: *******************************************************************************/ #ifndef __INCcommTypes #define __INCcommTypes /*** TYPE DEFINATIONS ***/ /*---------------------------------------------* * Boolean definitions *---------------------------------------------*/ #define FALSE 0 /*!< BOOLEAN value @ingroup os_types */ #define TRUE 1 /*!< BOOLEAN value @ingroup os_types */ #ifndef BOOLEAN typedef int BOOLEAN; /*!< 4 bytes @ingroup os_types */ #endif #ifndef VOID #define VOID void #endif #ifndef BYTE typedef char BYTE; #endif #ifndef INT8 typedef char INT8; #endif #ifndef INT16 typedef short INT16; #endif #ifndef INT32 typedef int INT32; #endif #ifndef INT64 typedef long long INT64; #endif #ifndef UINT8 typedef unsigned char UINT8; #endif #ifndef UINT16 typedef unsigned short UINT16; #endif #ifndef UINT32 typedef unsigned int UINT32; #endif #ifndef UINT64 typedef unsigned long long UINT64; #endif /*---------------------------------------------* * Datatype limits *---------------------------------------------*/ #define INT8_MAX (127) /*!< max INT8 @ingroup os_types */ #define INT16_MAX (32767) /*!< max INT16 @ingroup os_types */ #define INT32_MAX (2147483647) /*!< max INT32 @ingroup os_types */ #ifndef INT64_MAX #define INT64_MAX (9223372036854775807LL) /*!< max INT64 @ingroup os_types */ #endif #ifndef INT8_MIN #define INT8_MIN (-128) /*!< min INT8 @ingroup os_types */ #endif #ifndef INT16_MIN #define INT16_MIN (-32768) /*!< min INT16 @ingroup os_types */ #endif #ifndef INT32_MIN #define INT32_MIN (-2147483648) /*!< min INT32 @ingroup os_types */ #endif #ifndef INT64_MIN #define INT64_MIN (-9223372036854775808LL) /*!< min INT64 @ingroup os_types */ #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) /*!< max @ingroup os_types */ #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) /*!< max @ingroup os_types */ #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) /*!< max @ingroup os_types */ #endif #ifndef UINT64_MAX #define UINT64_MAX (18446744073709551615ULL) /*!< max @ingroup os_types */ #endif #define UINT8_MSB 0x80 /*!< MSB 1 b @ingroup os_types */ #define UINT16_MSB 0x8000 /*!< MSB 2 b @ingroup os_types */ #define UINT32_MSB 0x80000000 /*!< MSB 4 b @ingroup os_types */ #define UINT64_MSB 0x8000000000000000ULL /*!< MSB 8 b @ingroup os_types */ /*---------------------------------------------* * Storage units *---------------------------------------------*/ #define KB (1024) /*!< KBytes @ingroup os_types */ #define MB (1048576) /*!< MBytes @ingroup os_types */ #define GB (1073741824) /*!< GBytes @ingroup os_types */ #define TB (1099511627776ULL) /*!< TBytes @ingroup os_types */ /*---------------------------------------------* * CPU address data types *---------------------------------------------*/ #ifndef ADDR typedef unsigned int ADDR; /*!< 4 bytes @ingroup os_types */ #endif #ifndef NULL #define NULL ((VOID*) 0) /*!< NULL @ingroup os_types */ #endif /*---------------------------------------------* * Compiler function keywords *---------------------------------------------*/ #define EXTERN extern /*!< global @ingroup os_types */ #define STATIC static /*!< local @ingroup os */ #define PUBLIC extern /*!< local @ingroup os */ #define LOCAL static /*!< local @ingroup os */ #ifndef INLINE #define INLINE __inline /*!< inline @ingroup os_types */ #endif #endif //INCcommTypes