Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 57384965ecdf5abd31daa7919dcf1f2c5cdbb2ec (plain) (blame)
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
125
126
127
128
129
130
131
/*******************************************************************************
 * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * CONTRIBUTORS:
 * 		Juergen Haug (initial contribution)
 *
 *******************************************************************************/

/*
 *  Generic version for most platforms based on std.
 */
#ifdef __cplusplus
extern "C" {
#endif

#ifndef _ETSTDDATATYPES_H_
#define _ETSTDDATATYPES_H_

#ifndef _ETDATATYPES_H_
#error etStdDatatypes must not be included before etDatatypes (include etDatatypes instead).
#endif

/*
 Define switches for additional data types:
 #define ET_INT64
 #define ET_FLOAT32
 #define ET_FLOAT64
 */

#include <stddef.h>
#include <stdint.h>
#include <inttypes.h>
#include <stdbool.h>

/* --- Data types for room.basic.types */

/* bool already defined */
typedef uint8_t uint8;
typedef uint16_t uint16;
typedef uint32_t uint32;

typedef int8_t int8;
typedef int16_t int16;
typedef int32_t int32;

#ifdef ET_INT64
typedef uint64_t uint64;
typedef int64_t int64;
#endif

#ifdef ET_FLOAT32
typedef float float32;
#endif
#ifdef ET_FLOAT64
typedef double float64;
#endif

typedef char* charPtr;

/*-----------------------------------------------------------*/

/*--- Cross language support (e.g. Java,C/C++) */

#define null NULL
/* typedef x boolean */

/*-----------------------------------------------------------*/

/*--- Required types of runtime */
typedef bool etBool;
#define ET_TRUE true
#define ET_FALSE false

typedef uint8 etUInt8;
typedef uint16 etUInt16;
typedef uint32 etUInt32;

typedef int8 etInt8;
typedef int16 etInt16;
typedef int32 etInt32;

#ifdef ET_INT64
typedef uint64_t etUInt64;
typedef int64_t etInt64;
#endif

#ifdef ET_FLOAT32
typedef float32 etFloat32;
#endif
#ifdef ET_FLOAT64
typedef float64 etFloat64;
#endif

typedef charPtr etCharPtr;

typedef etInt16 etAddressId;

/* mandatory:
 #define etALIGNMENT		x	// power of 2 and >= sizeof(int) !
 typedef x etFileHandle;
 */

/*
 typedef float32 etFloat32;
 typedef float64 etFloat64;
 */

/* types for osal */

/* mandatory:
 typedef x etOSMutexData;
 typedef x etOSThreadData;
 typedef x etOSThreadId;
 typedef x etOSSemaData;
 typedef x etOSTimerData;
 typedef x etOSTimerId;
 */

/*-----------------------------------------------------------*/

#endif /* _ETSTDDATATYPES_H_ */

#ifdef __cplusplus
}
#endif

Back to the top