Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: f893abfc1d6c30ad02f02616d53e66f9060e8d5d (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
/*******************************************************************************
 * 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 v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * CONTRIBUTORS:
 * 		Thomas Schuetz (initial contribution), Thomas Jung
 *
 *******************************************************************************/

#ifndef _ETDATATYPES_H_
#define _ETDATATYPES_H_

/*
 * typedefs for platform specific datatypes
 * Version for TI MSP 430
 *
 * */

#include <stdio.h>
#include <FreeRTOS.h>
#include <task.h>
#include <timers.h>
#include <semphr.h>

/* unsigned integer datatypes */
typedef unsigned char uint8;
typedef unsigned short int uint16;
typedef unsigned long uint32;
/* typedef unsigned long long uint64; */ /* not available on this platform */

/* signed integer datatypes */
typedef char int8;
typedef short int int16;
typedef long int32;
/* typedef long long int64; */ /* not available on this platform */


/* float datatypes */
typedef float float32;
/* typedef double float64; */ /* not available on this platform */

/* boolean datatypes and values */
typedef char bool;  /* TODO: bool, Bool, Boolean, and boolean are already defined in some platforms*/
typedef bool boolean;
#ifndef ET_TRUE
	#define ET_TRUE 1
#endif
#ifndef ET_FALSE
	#define ET_FALSE 0
#endif

/*
 * typedefs for eTrice Runtime and Testing
 *
 * */

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

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

typedef bool etBool;

#define etALIGNMENT		2	/* power of 2 and >= sizeof(int) ! */

typedef float32 etFloat32;
typedef float32 etFloat64;

/* string datatypes */
typedef char* charPtr;


typedef FILE* etFileHandle;

typedef int8 etAddressId;


/*
 * typedefs for OS-specific types
 */
typedef xSemaphoreHandle etOSMutexData;
typedef xSemaphoreHandle etOSSemaData;

typedef xTaskHandle etOSThreadData;
typedef uint16 etOSThreadId;

typedef xTimerHandle etOSTimerData;
typedef uint16 etOSTimerId;

/*
typedef CRITICAL_SECTION etOSMutexData;
typedef HANDLE etOSThreadData;
typedef DWORD etOSThreadId;
typedef HANDLE etOSSemaData;
typedef HANDLE etOSTimerData;
typedef DWORD etOSTimerId;
*/

#endif /* _DATATYPES_H_ */

Back to the top