MotorWare f2806x Module API Documentation

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

types.h
Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
2 * Copyright (c) 2013, Texas Instruments Incorporated
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 * --/COPYRIGHT--*/
37
38
39 // **************************************************************************
40 // the includes
41
42 #ifndef _TYPES_H_
43 #define _TYPES_H_
44
45 // system
46 #include "stdbool.h" // needed for bool type, true/false
47 #if !defined(__TMS320C28XX_CLA__)
48 #include "string.h" // needed for size_t typedef
49 #endif
50 #include "stdint.h" // needed for C99 data types
51
52
57
58
59 // Include the algorithm overview defined in modules/<module>/docs/doxygen/doxygen.h
61
62
63 #ifdef __cplusplus
64 extern "C" {
65 #endif
66
67
68 // **************************************************************************
69 // the defines
70
71
74 #define HIGH 1
75
76
79 #define LOW 0
80
81
84 #define OFF 0
85
86
89 #define OK 0
90
91
94 #define ON 1
95
96
99 #define ERROR 1
100
103 #define PASS 1
104
105
108 #define FAIL 0
109
110
111 // **************************************************************************
112 // the typedefs
113
116 typedef unsigned int status;
117
118
121 typedef float float_t;
122
123
126 typedef long double double_t;
127
128
129 #ifdef __TMS320C28XX_CLA__
130 #ifndef NULL
131 /*LDRA_INSPECTED 218 S MR12 21.2 "NULL is defined in string.h but this header is not supported by CLA compiler, so defining NULL"*/
132 /*LDRA_INSPECTED 626 S MR12 20.4 "NULL is defined in string.h but this header is not supported by CLA compiler, so defining NULL"*/
133 #define NULL 0
134 #endif
135
136
137 typedef uint16_t _Bool;
138
139
140 typedef unsigned int size_t;
141 #endif
142
143
146 typedef struct _cplx_int_least8_t
147 {
148 int_least8_t imag;
149 int_least8_t real;
150 } cplx_int_least8_t;
151
152
155 typedef struct _cplx_uint_least8_t
156 {
157 uint_least8_t imag;
158 uint_least8_t real;
159 } cplx_uint_least8_t;
160
161
164 typedef struct _cplx_least16_t
165 {
166 int_least16_t imag;
167 int_least16_t real;
168 } cplx_int_least16_t;
169
170
173 typedef struct _cplx_uleast16_t
174 {
175 uint_least16_t imag;
176 uint_least16_t real;
177 } cplx_uint_least16_t;
178
179
182 typedef struct _cplx_int_least32_t_
183 {
184 int_least32_t imag;
185 int_least32_t real;
186 } cplx_int_least32_t;
187
188
191 typedef struct _cplx_uint_least32_t_
192 {
193 uint_least32_t imag;
194 uint_least32_t real;
195 } cplx_uint_least32_t;
196
197
200 typedef struct _cplx_int16_t_
201 {
202 int16_t imag;
203 int16_t real;
204 } cplx_int16_t;
205
206
209 typedef struct _cplx_uint16_t_
210 {
211 uint16_t imag;
212 uint16_t real;
213 } cplx_uint16_t;
214
215
218 typedef struct _cplx_int32_t
219 {
220 int32_t imag;
221 int32_t real;
222 } cplx_int32_t;
223
224
227 typedef struct _cplx_uint32_t
228 {
229 uint32_t imag;
230 uint32_t real;
231 } cplx_uint32_t;
232
233
234 #ifdef __cplusplus
235 }
236 #endif /* extern "C" */
237
239 #endif // end of _TYPES_H_ definition
240
241
double_t
long double double_t
Defines the portable data type for 64 bit, signed floating-point data.
Definition: types.h:126
_cplx_uleast16_t
Define the complex data type for at least 16 bit unsigned real and imaginary components.
Definition: types.h:173
_cplx_int16_t_::real
int16_t real
Definition: types.h:203
_cplx_int32_t::real
int32_t real
Definition: types.h:221
_cplx_uint32_t::imag
uint32_t imag
Definition: types.h:229
_cplx_int_least8_t
Define the complex data type for at least 8 bit signed real and imaginary components.
Definition: types.h:146
_cplx_int32_t::imag
int32_t imag
Definition: types.h:220
_cplx_uint16_t_::real
uint16_t real
Definition: types.h:212
_cplx_uint_least32_t_::real
uint_least32_t real
Definition: types.h:194
_cplx_int32_t
Define the complex data type for 32 bit signed real and imaginary components.
Definition: types.h:218
_cplx_int_least32_t_::real
int_least32_t real
Definition: types.h:185
_cplx_uleast16_t::real
uint_least16_t real
Definition: types.h:176
_cplx_uint32_t::real
uint32_t real
Definition: types.h:230
_cplx_int_least32_t_
Define the complex data type for at least 32 bit signed real and imaginary components.
Definition: types.h:182
_cplx_uint32_t
Define the complex data type for 32 bit unsigned real and imaginary components.
Definition: types.h:227
status
unsigned int status
Defines the portable data type for a status result.
Definition: types.h:116
cplx_int_least32_t
struct _cplx_int_least32_t_ cplx_int_least32_t
Define the complex data type for at least 32 bit signed real and imaginary components.
_cplx_uint_least32_t_
Define the complex data type for at least 32 bit unsigned real and imaginary components.
Definition: types.h:191
_cplx_uint_least8_t
Define the complex data type for at least 8 bit unsigned real and imaginary components.
Definition: types.h:155
_cplx_int16_t_
Define the complex data type for 16 bit signed real and imaginary components.
Definition: types.h:200
_cplx_uint_least8_t::real
uint_least8_t real
Definition: types.h:158
_cplx_least16_t
Define the complex data type for at least 16 bit signed real and imaginary components.
Definition: types.h:164
cplx_int16_t
struct _cplx_int16_t_ cplx_int16_t
Define the complex data type for 16 bit signed real and imaginary components.
cplx_int32_t
struct _cplx_int32_t cplx_int32_t
Define the complex data type for 32 bit signed real and imaginary components.
_cplx_uleast16_t::imag
uint_least16_t imag
Definition: types.h:175
_cplx_int16_t_::imag
int16_t imag
Definition: types.h:202
_cplx_least16_t::imag
int_least16_t imag
Definition: types.h:166
cplx_int_least8_t
struct _cplx_int_least8_t cplx_int_least8_t
Define the complex data type for at least 8 bit signed real and imaginary components.
cplx_uint32_t
struct _cplx_uint32_t cplx_uint32_t
Define the complex data type for 32 bit unsigned real and imaginary components.
_cplx_int_least32_t_::imag
int_least32_t imag
Definition: types.h:184
_cplx_least16_t::real
int_least16_t real
Definition: types.h:167
cplx_uint_least16_t
struct _cplx_uleast16_t cplx_uint_least16_t
Define the complex data type for at least 16 bit unsigned real and imaginary components.
cplx_uint_least32_t
struct _cplx_uint_least32_t_ cplx_uint_least32_t
Define the complex data type for at least 32 bit unsigned real and imaginary components.
_cplx_uint16_t_::imag
uint16_t imag
Definition: types.h:211
_cplx_int_least8_t::imag
int_least8_t imag
Definition: types.h:148
_cplx_int_least8_t::real
int_least8_t real
Definition: types.h:149
_cplx_uint16_t_
Define the complex data type for 16 bit unsigned real and imaginary components.
Definition: types.h:209
_cplx_uint_least8_t::imag
uint_least8_t imag
Definition: types.h:157
_cplx_uint_least32_t_::imag
uint_least32_t imag
Definition: types.h:193
cplx_int_least16_t
struct _cplx_least16_t cplx_int_least16_t
Define the complex data type for at least 16 bit signed real and imaginary components.
cplx_uint16_t
struct _cplx_uint16_t_ cplx_uint16_t
Define the complex data type for 16 bit unsigned real and imaginary components.
cplx_uint_least8_t
struct _cplx_uint_least8_t cplx_uint_least8_t
Define the complex data type for at least 8 bit unsigned real and imaginary components.
float_t
float float_t
Defines the portable data type for 32 bit, signed floating-point data.
Definition: types.h:121