1 /****************************************************************************** 2 * 3 * Copyright (C) 1999-2012 Broadcom Corporation 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at: 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 ******************************************************************************/ 18 19 #ifndef DATA_TYPES_H 20 #define DATA_TYPES_H 21 22 #ifndef NULL 23 #define NULL 0 24 #endif 25 26 #ifndef FALSE 27 #define FALSE 0 28 #endif 29 30 typedef unsigned char UINT8; 31 typedef unsigned short UINT16; 32 typedef unsigned long UINT32; 33 typedef signed long INT32; 34 typedef signed char INT8; 35 typedef signed short INT16; 36 typedef unsigned char BOOLEAN; 37 38 39 typedef UINT32 TIME_STAMP; 40 41 #ifndef TRUE 42 #define TRUE (!FALSE) 43 #endif 44 45 typedef unsigned char UBYTE; 46 47 #ifdef __arm 48 #define PACKED __packed 49 #define INLINE __inline 50 #else 51 #define PACKED 52 #define INLINE 53 #endif 54 55 #ifndef BIG_ENDIAN 56 #define BIG_ENDIAN FALSE 57 #endif 58 59 #define UINT16_LOW_BYTE(x) ((x) & 0xff) 60 #define UINT16_HI_BYTE(x) ((x) >> 8) 61 62 63 #define BCM_STRCAT_S(x1,x2,x3) strcat((x1),(x3)) 64 #define BCM_STRNCAT_S(x1,x2,x3,x4) strncat((x1),(x3),(x4)) 65 #define BCM_STRCPY_S(x1,x2,x3) strcpy((x1),(x3)) 66 #define BCM_STRNCPY_S(x1,x2,x3,x4) strncpy((x1),(x3),(x4)) 67 68 69 70 #endif 71 72