-
Notifications
You must be signed in to change notification settings - Fork 1
/
rtwtypes.h
122 lines (106 loc) · 4.17 KB
/
rtwtypes.h
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
/*
* File: rtwtypes.h
*
* Code generated for Simulink model 'SWatchFSM'.
*
* Model version : 1.199
* Simulink Coder version : 8.7 (R2014b) 08-Sep-2014
* C/C++ source code generated on : Wed Feb 17 14:10:03 2016
*
* Target selection: ert.tlc
* Embedded hardware selection: 32-bit Generic
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#ifndef __RTWTYPES_H__
#define __RTWTYPES_H__
/* Logical type definitions */
#if (!defined(__cplusplus))
# ifndef false
# define false (0U)
# endif
# ifndef true
# define true (1U)
# endif
#endif
#define __TMWTYPES__
/*=======================================================================*
* Target hardware information
* Device type: 32-bit Generic
* Number of bits: char: 8 short: 16 int: 32
* long: 32
* native word size: 32
* Byte ordering: Unspecified
* Signed integer division rounds to: Undefined
* Shift right on a signed integer as arithmetic shift: on
*=======================================================================*/
/*=======================================================================*
* Fixed width word size data types: *
* int8_T, int16_T, int32_T - signed 8, 16, or 32 bit integers *
* uint8_T, uint16_T, uint32_T - unsigned 8, 16, or 32 bit integers *
*=======================================================================*/
typedef signed char int8_T;
typedef unsigned char uint8_T;
typedef short int16_T;
typedef unsigned short uint16_T;
typedef int int32_T;
typedef unsigned int uint32_T;
/*===========================================================================*
* Generic type definitions: boolean_T, int_T, uint_T, ulong_T, char_T, *
* and byte_T. *
*===========================================================================*/
typedef unsigned char boolean_T;
typedef int int_T;
typedef unsigned int uint_T;
typedef unsigned long ulong_T;
typedef char char_T;
typedef unsigned char uchar_T;
typedef char_T byte_T;
/*=======================================================================*
* Min and Max: *
* int8_T, int16_T, int32_T - signed 8, 16, or 32 bit integers *
* uint8_T, uint16_T, uint32_T - unsigned 8, 16, or 32 bit integers *
*=======================================================================*/
#define MAX_int8_T ((int8_T)(127))
#define MIN_int8_T ((int8_T)(-128))
#define MAX_uint8_T ((uint8_T)(255U))
#define MIN_uint8_T ((uint8_T)(0U))
#define MAX_int16_T ((int16_T)(32767))
#define MIN_int16_T ((int16_T)(-32768))
#define MAX_uint16_T ((uint16_T)(65535U))
#define MIN_uint16_T ((uint16_T)(0U))
#define MAX_int32_T ((int32_T)(2147483647))
#define MIN_int32_T ((int32_T)(-2147483647-1))
#define MAX_uint32_T ((uint32_T)(0xFFFFFFFFU))
#define MIN_uint32_T ((uint32_T)(0U))
/* Block D-Work pointer type */
typedef void * pointer_T;
/* Simulink specific types */
#ifndef __ZERO_CROSSING_TYPES__
#define __ZERO_CROSSING_TYPES__
/* Trigger directions: falling, either, and rising */
typedef enum {
FALLING_ZERO_CROSSING = -1,
ANY_ZERO_CROSSING = 0,
RISING_ZERO_CROSSING = 1
} ZCDirection;
/* Previous state of a trigger signal */
typedef uint8_T ZCSigState;
/* Initial value of a trigger zero crossing signal */
#define UNINITIALIZED_ZCSIG 0x03U
#define NEG_ZCSIG 0x02U
#define POS_ZCSIG 0x01U
#define ZERO_ZCSIG 0x00U
/* Current state of a trigger signal */
typedef enum {
FALLING_ZCEVENT = -1,
NO_ZCEVENT = 0,
RISING_ZCEVENT = 1
} ZCEventType;
#endif /* __ZERO_CROSSING_TYPES__ */
#endif /* __RTWTYPES_H__ */
/*
* File trailer for generated code.
*
* [EOF]
*/