summaryrefslogtreecommitdiffstats
path: root/domx/mm_osal/inc/timm_osal_types.h
blob: 882148dda4239ede688a1c41a1d160b655819729 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/*
 * Copyright (c) 2010, Texas Instruments Incorporated
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * *  Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * *  Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * *  Neither the name of Texas Instruments Incorporated nor the names of
 *    its contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

/*
*  @file timm_osal_types.h
*  The timm_osal_types header file defines the primative osal type definitions.
*  @path
*
*/
/* -------------------------------------------------------------------------- */
/* =========================================================================
 *!
 *! Revision History
 *! ===================================
 *! 0.1: Created the first draft version, ksrini@ti.com
 * ========================================================================= */

#ifndef _TIMM_OSAL_TYPES_H_
#define _TIMM_OSAL_TYPES_H_

#ifdef __cplusplus
extern "C"
{
#endif				/* __cplusplus */



#ifdef __KERNEL__
#include <linux/types.h>
#else
#include <stdint.h>
#endif

	typedef int8_t TIMM_OSAL_S8;	/*INT8 */
	typedef int16_t TIMM_OSAL_S16;	/*INT16 */
	typedef int32_t TIMM_OSAL_S32;	/*INT32 */

#define TIMM_OSAL_INT8_MIN 0xFF
#define TIMM_OSAL_INT8_MAX 0x7F

#define TIMM_OSAL_INT16_MIN 0xFFFF
#define TIMM_OSAL_INT16_MAX 0x7FFF

#define TIMM_OSAL_INT32_MIN 0xFFFFFFFF
#define TIMM_OSAL_INT32_MAX 0x7FFFFFFF

	typedef uint8_t TIMM_OSAL_U8;	/*UINT8 */
	typedef uint16_t TIMM_OSAL_U16;	/*UINT16 */
	typedef uint32_t TIMM_OSAL_U32;	/*UINT32 */

#define TIMM_OSAL_UINT8_MIN 0
#define TIMM_OSAL_UINT8_MAX 0xFF

#define TIMM_OSAL_UINT16_MIN 0
#define TIMM_OSAL_UINT16_MAX 0xFFFF

#define TIMM_OSAL_UINT32_MIN 0
#define TIMM_OSAL_UINT32_MAX 0xFFFFFFFF


	typedef char TIMM_OSAL_CHAR;
	  /*CHAR*/ typedef void *TIMM_OSAL_HANDLE;
	typedef void *TIMM_OSAL_PTR;

	typedef enum TIMM_OSAL_BOOL
	{
		TIMM_OSAL_FALSE = 0,
		TIMM_OSAL_TRUE = !TIMM_OSAL_FALSE,
		TIMM_OSAL_BOOL_MAX = 0x7FFFFFFF
	} TIMM_OSAL_BOOL;

#define TIMM_OSAL_SUSPEND     0xFFFFFFFFUL
#define TIMM_OSAL_NO_SUSPEND  0x0
#define TIMM_OSAL_TIMED_OUT   0x7FFFFFFFUL


#define SUCCESS 0
#define NO_SUCCESS -1

#define ERROR 1
/*
#define TRUE 0
#define FALSE 1
*/
#define URGENT_MESSAGE 2
#define NORMAL_MESSAGE 1


#define TIMM_OSAL_NULL 0

#ifdef __cplusplus
}
#endif				/* __cplusplus */

#endif				/* _TIMM_OSAL_TYPES_H_ */