4 * Definitions required by Real-Time Workshop generated code.
\r
6 * Real-Time Workshop version: 7.0
\r
7 * Generated on: 2008-03-22 00:27:13
\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, char_T, int_T, *
\r
51 * uint_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 char char_T;
\r
59 typedef char_T byte_T;
\r
61 /*=======================================================================*
\r
63 * int8_T, int16_T, int32_T - signed 8, 16, or 32 bit integers *
\r
64 * uint8_T, uint16_T, uint32_T - unsigned 8, 16, or 32 bit integers *
\r
65 *=======================================================================*/
\r
66 #define MAX_int8_T ((int8_T)(127))
\r
67 #define MIN_int8_T ((int8_T)(-128))
\r
68 #define MAX_uint8_T ((uint8_T)(255U))
\r
69 #define MIN_uint8_T ((uint8_T)(0U))
\r
70 #define MAX_int16_T ((int16_T)(32767))
\r
71 #define MIN_int16_T ((int16_T)(-32768))
\r
72 #define MAX_uint16_T ((uint16_T)(65535U))
\r
73 #define MIN_uint16_T ((uint16_T)(0U))
\r
74 #define MAX_int32_T ((int32_T)(2147483647))
\r
75 #define MIN_int32_T ((int32_T)(-2147483647-1))
\r
76 #define MAX_uint32_T ((uint32_T)(0xFFFFFFFFU))
\r
77 #define MIN_uint32_T ((uint32_T)(0U))
\r
79 /* Logical type definitions */
\r
80 #if !defined(__cplusplus) && !defined(__true_false_are_keywords)
\r
91 * Real-Time Workshop assumes the code is compiled on a target using a 2's compliment representation
\r
92 * for signed integer values.
\r
94 #if ((SCHAR_MIN + 1) != -SCHAR_MAX)
\r
95 #error "This code must be compiled using a 2's complement representation for signed integer values"
\r
99 * Maximum length of a MATLAB identifier (function/variable/model)
\r
100 * including the null-termination character. Referenced by
\r
101 * rt_logging.c and rt_matrx.c.
\r
103 #define TMW_NAME_LENGTH_MAX 64
\r
105 /* This ID is used to detect inclusion of an incompatible rtwtypes.h */
\r
106 #define RTWTYPES_ID_C08S16I32L32N32F1
\r
107 #else /* __TMWTYPES__ */
\r
108 #define TMWTYPES_PREVIOUSLY_INCLUDED
\r
109 #endif /* __TMWTYPES__ */
\r
111 /* Block D-Work pointer type */
\r
112 typedef void * pointer_T;
\r
114 /* Simulink specific types */
\r
115 #ifndef __SIMSTRUC_TYPES_H__
\r
116 #define __SIMSTRUC_TYPES_H__
\r
118 /* States of an enabled subsystem */
\r
120 SUBSYS_DISABLED = 0,
\r
121 SUBSYS_ENABLED = 2,
\r
122 SUBSYS_BECOMING_DISABLED = 4,
\r
123 SUBSYS_BECOMING_ENABLED = 8,
\r
124 SUBSYS_TRIGGERED = 16
\r
127 /* Trigger directions: falling, either, and rising */
\r
129 FALLING_ZERO_CROSSING = -1,
\r
130 ANY_ZERO_CROSSING = 0,
\r
131 RISING_ZERO_CROSSING = 1
\r
134 /* Previous state of a trigger signal */
\r
135 typedef uint8_T ZCSigState;
\r
137 #define UNINITIALIZED_ZCSIG 0x03U
\r
138 #define NEG_ZCSIG 0x02U
\r
139 #define POS_ZCSIG 0x01U
\r
140 #define ZERO_ZCSIG 0x00U
\r
141 #define ZC_EVENT_NUL 0x00
\r
142 #define ZC_EVENT_N2P 0x01
\r
143 #define ZC_EVENT_N2Z 0x02
\r
144 #define ZC_EVENT_Z2P 0x04
\r
145 #define ZC_EVENT_P2N 0x08
\r
146 #define ZC_EVENT_P2Z 0x10
\r
147 #define ZC_EVENT_Z2N 0x20
\r
148 #define ZC_EVENT_ALL_UP (ZC_EVENT_N2P | ZC_EVENT_N2Z | ZC_EVENT_Z2P )
\r
149 #define ZC_EVENT_ALL_DN (ZC_EVENT_P2N | ZC_EVENT_P2Z | ZC_EVENT_Z2N )
\r
150 #define ZC_EVENT_ALL (ZC_EVENT_ALL_UP | ZC_EVENT_ALL_DN )
\r
152 /* Current state of a trigger signal */
\r
154 FALLING_ZCEVENT = -1,
\r
159 /* Enumeration of built-in data types */
\r
161 SS_DOUBLE = 0, /* real_T */
\r
162 SS_SINGLE = 1, /* real32_T */
\r
163 SS_INT8 = 2, /* int8_T */
\r
164 SS_UINT8 = 3, /* uint8_T */
\r
165 SS_INT16 = 4, /* int16_T */
\r
166 SS_UINT16 = 5, /* uint16_T */
\r
167 SS_INT32 = 6, /* int32_T */
\r
168 SS_UINT32 = 7, /* uint32_T */
\r
169 SS_BOOLEAN = 8 /* boolean_T */
\r
172 #define SS_NUM_BUILT_IN_DTYPE ((int_T)SS_BOOLEAN+1)
\r
174 typedef int_T DTypeId;
\r
176 #endif /* __SIMSTRUC_TYPES_H__ */
\r
177 #endif /* __RTWTYPES_H__ */
\r