M4OSA_Types.h revision aa382f3637a68361989d5b70e3184bddcc472d3d
1/* 2 * Copyright (C) 2004-2011 NXP Software 3 * Copyright (C) 2011 The Android Open Source Project 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 * @file M4OSA_Types.h 20 * @ingroup OSAL 21 * @brief Abstraction types for Android 22 * @note This file redefines basic types which must be 23 * used to declare any variable. 24************************************************************************ 25*/ 26 27 28#ifndef M4OSA_TYPES_H 29#define M4OSA_TYPES_H 30 31#include <ctype.h> 32#include <stdio.h> 33#include <string.h> 34#include "M4OSA_Export.h" 35#ifdef __cplusplus 36extern "C" { 37#endif 38 39 40typedef signed char M4OSA_Bool; 41typedef unsigned char M4OSA_UInt8; 42typedef signed char M4OSA_Int8; 43typedef unsigned short M4OSA_UInt16; 44typedef signed short M4OSA_Int16; 45typedef unsigned long M4OSA_UInt32; 46typedef signed long M4OSA_Int32; 47 48typedef signed char M4OSA_Char; 49typedef unsigned char M4OSA_UChar; 50 51typedef double M4OSA_Double; 52typedef float M4OSA_Float; 53 54typedef unsigned char M4OSA_WChar; 55 56typedef void M4OSA_Void; 57 58/* Min & max definitions*/ 59#define M4OSA_UINT8_MIN 0 60#define M4OSA_UINT8_MAX 255 61 62#define M4OSA_UINT16_MIN 0 63#define M4OSA_UINT16_MAX 65535 64 65#define M4OSA_UINT32_MIN 0 66#define M4OSA_UINT32_MAX 0xFFFFFFFF 67 68#define M4OSA_INT8_MIN -128 69#define M4OSA_INT8_MAX 127 70 71#define M4OSA_INT16_MIN -32768 72#define M4OSA_INT16_MAX 32767 73 74#define M4OSA_INT32_MIN (-0x7FFFFFFF-1) 75#define M4OSA_INT32_MAX 0x7FFFFFFF 76 77#define M4OSA_CHAR_MIN -128 78#define M4OSA_CHAR_MAX 127 79 80#define M4OSA_UCHAR_MIN 0 81#define M4OSA_UCHAR_MAX 255 82 83#define M4OSA_NULL 0x00 84#define M4OSA_TRUE 0x01 85#define M4OSA_FALSE 0x00 86#define M4OSA_WAIT_FOREVER 0xffffffff 87 88#define M4OSA_CONST const 89#define M4OSA_INLINE inline 90 91/* Rollover offset of the clock */ 92/* This value must be the one of M4OSA_clockGetTime */ 93#define M4OSA_CLOCK_ROLLOVER M4OSA_INT32_MAX 94 95typedef void* M4OSA_Context; 96 97/** It is a unique ID for each core component*/ 98typedef M4OSA_UInt16 M4OSA_CoreID; 99 100#ifdef __cplusplus 101} 102#endif 103 104#endif /*M4OSA_TYPES_H*/ 105 106