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 #ifndef DATA_TYPES_H
     19 #define DATA_TYPES_H
     20 
     21 #include <stdbool.h>
     22 #include <stdint.h>
     23 
     24 #ifndef NULL
     25 #define NULL 0
     26 #endif
     27 
     28 #ifndef FALSE
     29 #define FALSE 0
     30 #endif
     31 
     32 typedef uint32_t TIME_STAMP;
     33 
     34 #ifndef TRUE
     35 #define TRUE (!FALSE)
     36 #endif
     37 
     38 typedef unsigned char UBYTE;
     39 
     40 #ifdef __arm
     41 #define PACKED __packed
     42 #define INLINE __inline
     43 #else
     44 #define PACKED
     45 #define INLINE
     46 #endif
     47 
     48 #ifndef BIG_ENDIAN
     49 #define BIG_ENDIAN FALSE
     50 #endif
     51 
     52 #define UINT16_LOW_BYTE(x) ((x)&0xff)
     53 #define UINT16_HI_BYTE(x) ((x) >> 8)
     54 
     55 #endif
     56