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 #include <stdint.h>
     23 #include <stdbool.h>
     24 
     25 #ifndef FALSE
     26 #  define FALSE  false
     27 #endif
     28 
     29 #ifndef TRUE
     30 #  define TRUE   true
     31 #endif
     32 
     33 typedef uint8_t UINT8;
     34 typedef uint16_t UINT16;
     35 typedef uint32_t UINT32;
     36 typedef uint64_t UINT64;
     37 
     38 typedef int8_t INT8;
     39 typedef int16_t INT16;
     40 typedef int32_t INT32;
     41 typedef bool BOOLEAN;
     42 
     43 typedef UINT32          TIME_STAMP;
     44 
     45 #ifdef __arm
     46 #  define PACKED  __packed
     47 #  define INLINE  __inline
     48 #else
     49 #  define PACKED
     50 #  define INLINE
     51 #endif
     52 
     53 #define BCM_STRCPY_S(x1,x2,x3)      strcpy((x1),(x3))
     54 #define BCM_STRNCPY_S(x1,x2,x3,x4)  strncpy((x1),(x3),(x4))
     55 
     56 #endif
     57