1 /* 2 * Copyright (C) 2011 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 /** 17 ************************************************************************ 18 * @file M4OSA_Types.h 19 * @ingroup OSAL 20 * @brief Abstraction types for Android 21 * @note This file redefines basic types which must be 22 * used to declare any variable. 23 ************************************************************************ 24 */ 25 26 27 #ifndef M4OSA_TYPES_H 28 #define M4OSA_TYPES_H 29 30 #include <ctype.h> 31 #include <stdio.h> 32 #include <string.h> 33 #include "M4OSA_Export.h" 34 #ifdef __cplusplus 35 extern "C" { 36 #endif 37 38 39 typedef signed char M4OSA_Bool; 40 typedef unsigned char M4OSA_UInt8; 41 typedef signed char M4OSA_Int8; 42 typedef unsigned short M4OSA_UInt16; 43 typedef signed short M4OSA_Int16; 44 typedef unsigned long M4OSA_UInt32; 45 typedef signed long M4OSA_Int32; 46 47 typedef signed char M4OSA_Char; 48 typedef unsigned char M4OSA_UChar; 49 50 typedef double M4OSA_Double; 51 typedef float M4OSA_Float; 52 53 typedef unsigned char M4OSA_WChar; 54 55 typedef void M4OSA_Void; 56 57 /* Min & max definitions*/ 58 #define M4OSA_UINT8_MIN 0 59 #define M4OSA_UINT8_MAX 255 60 61 #define M4OSA_UINT16_MIN 0 62 #define M4OSA_UINT16_MAX 65535 63 64 #define M4OSA_UINT32_MIN 0 65 #define M4OSA_UINT32_MAX 0xFFFFFFFF 66 67 #define M4OSA_INT8_MIN -128 68 #define M4OSA_INT8_MAX 127 69 70 #define M4OSA_INT16_MIN -32768 71 #define M4OSA_INT16_MAX 32767 72 73 #define M4OSA_INT32_MIN (-0x7FFFFFFF-1) 74 #define M4OSA_INT32_MAX 0x7FFFFFFF 75 76 #define M4OSA_CHAR_MIN -128 77 #define M4OSA_CHAR_MAX 127 78 79 #define M4OSA_UCHAR_MIN 0 80 #define M4OSA_UCHAR_MAX 255 81 82 #define M4OSA_NULL 0x00 83 #define M4OSA_TRUE 0x01 84 #define M4OSA_FALSE 0x00 85 #define M4OSA_WAIT_FOREVER 0xffffffff 86 87 #define M4OSA_CONST const 88 #define M4OSA_INLINE inline 89 90 /* Rollover offset of the clock */ 91 /* This value must be the one of M4OSA_clockGetTime */ 92 #define M4OSA_CLOCK_ROLLOVER M4OSA_INT32_MAX 93 94 typedef void* M4OSA_Context; 95 96 /** It is a unique ID for each core component*/ 97 typedef M4OSA_UInt16 M4OSA_CoreID; 98 99 #ifdef __cplusplus 100 } 101 #endif 102 103 #endif /*M4OSA_TYPES_H*/ 104 105