1/*
2 * Academic License - for use in teaching, academic research, and meeting
3 * course requirements at degree granting institutions only. Not for
4 * government, commercial, or other organizational use.
5 *
6 * File: magneto_tarato.h
7 *
8 * Code generated for Simulink model 'magneto_tarato'.
9 *
10 * Model version : 1.19
11 * Simulink Coder version : 8.12 (R2017a) 16-Feb-2017
12 * C/C++ source code generated on : Tue Nov 07 14:03:19 2017
13 *
14 * Target selection: ert.tlc
15 * Embedded hardware selection: ARM Compatible->ARM Cortex
16 * Code generation objectives: Unspecified
17 * Validation result: Not run
18 */
19
20#ifndef RTW_HEADER_magneto_tarato_h_
21#define RTW_HEADER_magneto_tarato_h_
22#include <math.h>
23#include <string.h>
24#include <float.h>
25#include <stddef.h>
26#ifndef magneto_tarato_COMMON_INCLUDES_
27# define magneto_tarato_COMMON_INCLUDES_
28#include <stddef.h>
29#include "rtwtypes.h"
30#include "rtw_extmode.h"
31#include "sysran_types.h"
32#include "rtw_continuous.h"
33#include "rtw_solver.h"
34#include "dt_info.h"
35#include "ext_work.h"
36#include "MW_I2C.h"
37#endif /* magneto_tarato_COMMON_INCLUDES_ */
38
39#include "magneto_tarato_types.h"
40
41/* Shared type includes */
42#include "multiword_types.h"
43#include "rt_defines.h"
44#include "rt_nonfinite.h"
45#include "rtGetInf.h"
46
47/* Macros for accessing real-time model data structure */
48#ifndef rtmGetFinalTime
49# define rtmGetFinalTime(rtm) ((rtm)->Timing.tFinal)
50#endif
51
52#ifndef rtmGetRTWExtModeInfo
53# define rtmGetRTWExtModeInfo(rtm) ((rtm)->extModeInfo)
54#endif
55
56#ifndef rtmGetErrorStatus
57# define rtmGetErrorStatus(rtm) ((rtm)->errorStatus)
58#endif
59
60#ifndef rtmSetErrorStatus
61# define rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val))
62#endif
63
64#ifndef rtmGetStopRequested
65# define rtmGetStopRequested(rtm) ((rtm)->Timing.stopRequestedFlag)
66#endif
67
68#ifndef rtmSetStopRequested
69# define rtmSetStopRequested(rtm, val) ((rtm)->Timing.stopRequestedFlag = (val))
70#endif
71
72#ifndef rtmGetStopRequestedPtr
73# define rtmGetStopRequestedPtr(rtm) (&((rtm)->Timing.stopRequestedFlag))
74#endif
75
76#ifndef rtmGetT
77# define rtmGetT(rtm) ((rtm)->Timing.taskTime0)
78#endif
79
80#ifndef rtmGetTFinal
81# define rtmGetTFinal(rtm) ((rtm)->Timing.tFinal)
82#endif
83
84/* Block signals (auto storage) */
85typedef struct {
86 real_T Reshape9to3x3columnmajor[9]; /* '<S1>/Reshape (9) to [3x3] column-major' */
87 real_T VectorConcatenate[9]; /* '<S1>/Vector Concatenate' */
88 real_T Gain; /* '<S3>/Gain' */
89 real_T Gain_g; /* '<S4>/Gain' */
90 real_T CorrMag[3]; /* '<Root>/MATLAB Function' */
91 real_T FXOS87006AxesSensor[3]; /* '<Root>/FXOS8700 6-Axes Sensor' */
92 uint32_T i2cname;
93} B_magneto_tarato_T;
94
95/* Block states (auto storage) for system '<Root>' */
96typedef struct {
97 freedomk64f_fxos8700_magneto__T obj; /* '<Root>/FXOS8700 6-Axes Sensor' */
98 struct {
99 void *LoggedData[2];
100 } Scope_PWORK; /* '<Root>/Scope' */
101
102 void *FXOS87006AxesSensor_PWORK; /* '<Root>/FXOS8700 6-Axes Sensor' */
103} DW_magneto_tarato_T;
104
105/* Parameters (auto storage) */
106struct P_magneto_tarato_T_ {
107 real_T FXOS87006AxesSensor_SampleTime;/* Expression: -1
108 * Referenced by: '<Root>/FXOS8700 6-Axes Sensor'
109 */
110 real_T Constant_Value; /* Expression: 1
111 * Referenced by: '<Root>/Constant'
112 */
113 real_T Constant6_Value; /* Expression: 0
114 * Referenced by: '<Root>/Constant6'
115 */
116 real_T Constant5_Value; /* Expression: 0
117 * Referenced by: '<Root>/Constant5'
118 */
119 real_T Constant2_Value; /* Expression: 0
120 * Referenced by: '<Root>/Constant2'
121 */
122 real_T Constant8_Value; /* Expression: 29.75
123 * Referenced by: '<Root>/Constant8'
124 */
125 real_T Constant9_Value; /* Expression: -19
126 * Referenced by: '<Root>/Constant9'
127 */
128 real_T Constant4_Value; /* Expression: 0
129 * Referenced by: '<Root>/Constant4'
130 */
131 real_T Constant3_Value; /* Expression: 0
132 * Referenced by: '<Root>/Constant3'
133 */
134 real_T Constant7_Value; /* Expression: 0
135 * Referenced by: '<Root>/Constant7'
136 */
137 real_T Constant1_Value; /* Expression: 1
138 * Referenced by: '<Root>/Constant1'
139 */
140 real_T Bias_Bias; /* Expression: -33
141 * Referenced by: '<Root>/Bias'
142 */
143 real_T Bias1_Bias; /* Expression: +35
144 * Referenced by: '<Root>/Bias1'
145 */
146 real_T Bias2_Bias; /* Expression: +53
147 * Referenced by: '<Root>/Bias2'
148 */
149 real_T Gain_Gain; /* Expression: -1
150 * Referenced by: '<Root>/Gain'
151 */
152 real_T Gain_Gain_j; /* Expression: 180/pi
153 * Referenced by: '<S3>/Gain'
154 */
155 real_T Gain1_Gain; /* Expression: -1
156 * Referenced by: '<Root>/Gain1'
157 */
158 real_T Gain_Gain_h; /* Expression: 180/pi
159 * Referenced by: '<S4>/Gain'
160 */
161};
162
163/* Real-time Model Data Structure */
164struct tag_RTM_magneto_tarato_T {
165 const char_T *errorStatus;
166 RTWExtModeInfo *extModeInfo;
167
168 /*
169 * Sizes:
170 * The following substructure contains sizes information
171 * for many of the model attributes such as inputs, outputs,
172 * dwork, sample times, etc.
173 */
174 struct {
175 uint32_T checksums[4];
176 } Sizes;
177
178 /*
179 * SpecialInfo:
180 * The following substructure contains special information
181 * related to other components that are dependent on RTW.
182 */
183 struct {
184 const void *mappingInfo;
185 } SpecialInfo;
186
187 /*
188 * Timing:
189 * The following substructure contains information regarding
190 * the timing information for the model.
191 */
192 struct {
193 time_T taskTime0;
194 uint32_T clockTick0;
195 time_T stepSize0;
196 time_T tFinal;
197 boolean_T stopRequestedFlag;
198 } Timing;
199};
200
201/* Block parameters (auto storage) */
202extern P_magneto_tarato_T magneto_tarato_P;
203
204/* Block signals (auto storage) */
205extern B_magneto_tarato_T magneto_tarato_B;
206
207/* Block states (auto storage) */
208extern DW_magneto_tarato_T magneto_tarato_DW;
209
210/* Model entry point functions */
211extern void magneto_tarato_initialize(void);
212extern void magneto_tarato_step(void);
213extern void magneto_tarato_terminate(void);
214
215/* Real-time Model object */
216extern RT_MODEL_magneto_tarato_T *const magneto_tarato_M;
217
218/*-
219 * The generated code includes comments that allow you to trace directly
220 * back to the appropriate location in the model. The basic format
221 * is <system>/block_name, where system is the system number (uniquely
222 * assigned by Simulink) and block_name is the name of the block.
223 *
224 * Use the MATLAB hilite_system command to trace the generated code back
225 * to the model. For example,
226 *
227 * hilite_system('<S3>') - opens system 3
228 * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
229 *
230 * Here is the system hierarchy for this model
231 *
232 * '<Root>' : 'magneto_tarato'
233 * '<S1>' : 'magneto_tarato/Create S Matrix'
234 * '<S2>' : 'magneto_tarato/MATLAB Function'
235 * '<S3>' : 'magneto_tarato/Radians to Degrees'
236 * '<S4>' : 'magneto_tarato/Radians to Degrees1'
237 */
238#endif /* RTW_HEADER_magneto_tarato_h_ */
239
240/*
241 * File trailer for generated code.
242 *
243 * [EOF]
244 */
245