4 * Definitions required by Real-Time Workshop generated code.
\r
6 * Real-Time Workshop version: 7.2
\r
7 * Generated on: 2008-09-30 17:40:50
\r
10 #ifndef __RTWTYPES_H__
\r
11 #define __RTWTYPES_H__
\r
20 #ifndef __TMWTYPES__
\r
21 #define __TMWTYPES__
\r
24 /*=======================================================================*
\r
25 * Target hardware information
\r
27 * Number of bits: char: 8 short: 16 int: 32
\r
28 * long: 32 native word size: 32
\r
29 * Byte ordering: LittleEndian
\r
30 * Signed integer division rounds to: Zero
\r
31 * Shift right on a signed integer as arithmetic shift: on
\r
32 *=======================================================================*/
\r
34 /*=======================================================================*
\r
35 * Fixed width word size data types: *
\r
36 * int8_T, int16_T, int32_T - signed 8, 16, or 32 bit integers *
\r
37 * uint8_T, uint16_T, uint32_T - unsigned 8, 16, or 32 bit integers *
\r
38 * real32_T, real64_T - 32 and 64 bit floating point numbers *
\r
39 *=======================================================================*/
\r
40 typedef signed char int8_T;
\r
41 typedef unsigned char uint8_T;
\r
42 typedef short int16_T;
\r
43 typedef unsigned short uint16_T;
\r
44 typedef int int32_T;
\r
45 typedef unsigned int uint32_T;
\r
46 typedef float real32_T;
\r
47 typedef double real64_T;
\r
49 /*===========================================================================*
\r
50 * Generic type definitions: real_T, time_T, boolean_T, int_T, uint_T, *
\r
51 * ulong_T, char_T and byte_T. *
\r
52 *===========================================================================*/
\r
53 typedef double real_T;
\r
54 typedef double time_T;
\r
55 typedef unsigned char boolean_T;
\r
57 typedef unsigned int uint_T;
\r
58 typedef unsigned long ulong_T;
\r
59 typedef char char_T;
\r
60 typedef char_T byte_T;
\r
62 /*=======================================================================*
\r
64 * int8_T, int16_T, int32_T - signed 8, 16, or 32 bit integers *
\r
65 * uint8_T, uint16_T, uint32_T - unsigned 8, 16, or 32 bit integers *
\r
66 *=======================================================================*/
\r
67 #define MAX_int8_T ((int8_T)(127))
\r
68 #define MIN_int8_T ((int8_T)(-128))
\r
69 #define MAX_uint8_T ((uint8_T)(255U))
\r
70 #define MIN_uint8_T ((uint8_T)(0U))
\r
71 #define MAX_int16_T ((int16_T)(32767))
\r
72 #define MIN_int16_T ((int16_T)(-32768))
\r
73 #define MAX_uint16_T ((uint16_T)(65535U))
\r
74 #define MIN_uint16_T ((uint16_T)(0U))
\r
75 #define MAX_int32_T ((int32_T)(2147483647))
\r
76 #define MIN_int32_T ((int32_T)(-2147483647-1))
\r
77 #define MAX_uint32_T ((uint32_T)(0xFFFFFFFFU))
\r
78 #define MIN_uint32_T ((uint32_T)(0U))
\r
80 /* Logical type definitions */
\r
81 #if !defined(__cplusplus) && !defined(__true_false_are_keywords)
\r
92 * Real-Time Workshop assumes the code is compiled on a target using a 2's compliment representation
\r
93 * for signed integer values.
\r
95 #if ((SCHAR_MIN + 1) != -SCHAR_MAX)
\r
96 #error "This code must be compiled using a 2's complement representation for signed integer values"
\r
100 * Maximum length of a MATLAB identifier (function/variable/model)
\r
101 * including the null-termination character. Referenced by
\r
102 * rt_logging.c and rt_matrx.c.
\r
104 #define TMW_NAME_LENGTH_MAX 64
\r
106 /* This ID is used to detect inclusion of an incompatible rtwtypes.h */
\r
107 #define RTWTYPES_ID_C08S16I32L32N32F1
\r
108 #else /* __TMWTYPES__ */
\r
109 #define TMWTYPES_PREVIOUSLY_INCLUDED
\r
110 #endif /* __TMWTYPES__ */
\r
112 /* Block D-Work pointer type */
\r
113 typedef void * pointer_T;
\r
115 /* Define RTW replacement data types. */
\r
116 #include "ecrobot_interface.h" /* User defined replacement datatype for int8_T uint8_T int16_T uint16_T int32_T uint32_T real32_T real_T boolean_T int_T uint_T char_T */
\r
118 /* Simulink specific types */
\r
119 #ifndef __SIMSTRUC_TYPES_H__
\r
120 #define __SIMSTRUC_TYPES_H__
\r
122 /* States of an enabled subsystem */
\r
124 SUBSYS_DISABLED = 0,
\r
125 SUBSYS_ENABLED = 2,
\r
126 SUBSYS_BECOMING_DISABLED = 4,
\r
127 SUBSYS_BECOMING_ENABLED = 8,
\r
128 SUBSYS_TRIGGERED = 16
\r
131 /* Trigger directions: falling, either, and rising */
\r
133 FALLING_ZERO_CROSSING = -1,
\r
134 ANY_ZERO_CROSSING = 0,
\r
135 RISING_ZERO_CROSSING = 1
\r
138 /* Previous state of a trigger signal */
\r
139 typedef uint8_T ZCSigState;
\r
141 #define UNINITIALIZED_ZCSIG 0x03U
\r
142 #define NEG_ZCSIG 0x02U
\r
143 #define POS_ZCSIG 0x01U
\r
144 #define ZERO_ZCSIG 0x00U
\r
145 #define ZC_EVENT_NUL 0x00
\r
146 #define ZC_EVENT_N2P 0x01
\r
147 #define ZC_EVENT_N2Z 0x02
\r
148 #define ZC_EVENT_Z2P 0x04
\r
149 #define ZC_EVENT_P2N 0x08
\r
150 #define ZC_EVENT_P2Z 0x10
\r
151 #define ZC_EVENT_Z2N 0x20
\r
152 #define ZC_EVENT_ALL_UP (ZC_EVENT_N2P | ZC_EVENT_N2Z | ZC_EVENT_Z2P )
\r
153 #define ZC_EVENT_ALL_DN (ZC_EVENT_P2N | ZC_EVENT_P2Z | ZC_EVENT_Z2N )
\r
154 #define ZC_EVENT_ALL (ZC_EVENT_ALL_UP | ZC_EVENT_ALL_DN )
\r
156 /* Current state of a trigger signal */
\r
158 FALLING_ZCEVENT = -1,
\r
163 /* Enumeration of built-in data types */
\r
165 SS_DOUBLE = 0, /* real_T */
\r
166 SS_SINGLE = 1, /* real32_T */
\r
167 SS_INT8 = 2, /* int8_T */
\r
168 SS_UINT8 = 3, /* uint8_T */
\r
169 SS_INT16 = 4, /* int16_T */
\r
170 SS_UINT16 = 5, /* uint16_T */
\r
171 SS_INT32 = 6, /* int32_T */
\r
172 SS_UINT32 = 7, /* uint32_T */
\r
173 SS_BOOLEAN = 8 /* boolean_T */
\r
176 #define SS_NUM_BUILT_IN_DTYPE ((int_T)SS_BOOLEAN+1)
\r
177 #define SS_UNDERLYING_TYPE_FOR_ENUM_DATA SS_INT32
\r
179 typedef int_T DTypeId;
\r
181 #endif /* __SIMSTRUC_TYPES_H__ */
\r
182 #endif /* __RTWTYPES_H__ */
\r