Home | History | Annotate | Download | only in ulinux
      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 unsigned long long      UINT64;
     34 
     35 typedef signed   long   INT32;
     36 typedef signed   char   INT8;
     37 typedef signed   short  INT16;
     38 typedef unsigned char   BOOLEAN;
     39 
     40 
     41 typedef UINT32          TIME_STAMP;
     42 
     43 #ifndef TRUE
     44 #define TRUE   (!FALSE)
     45 #endif
     46 
     47 typedef unsigned char   UBYTE;
     48 
     49 #ifdef __arm
     50 #define PACKED  __packed
     51 #define INLINE  __inline
     52 #else
     53 #define PACKED
     54 #define INLINE
     55 #endif
     56 
     57 #ifndef BIG_ENDIAN
     58 #define BIG_ENDIAN FALSE
     59 #endif
     60 
     61 #define UINT16_LOW_BYTE(x)      ((x) & 0xff)
     62 #define UINT16_HI_BYTE(x)       ((x) >> 8)
     63 
     64 
     65 #define BCM_STRCAT_S(x1,x2,x3)      strcat((x1),(x3))
     66 #define BCM_STRNCAT_S(x1,x2,x3,x4)  strncat((x1),(x3),(x4))
     67 #define BCM_STRCPY_S(x1,x2,x3)      strcpy((x1),(x3))
     68 #define BCM_STRNCPY_S(x1,x2,x3,x4)  strncpy((x1),(x3),(x4))
     69 
     70 
     71 
     72 #endif
     73 
     74