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: untitled.h |
7 | * |
8 | * Code generated for Simulink model 'untitled'. |
9 | * |
10 | * Model version : 1.0 |
11 | * Simulink Coder version : 8.12 (R2017a) 16-Feb-2017 |
12 | * C/C++ source code generated on : Mon Oct 02 12:36:06 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_untitled_h_ |
21 | #define RTW_HEADER_untitled_h_ |
22 | #include <math.h> |
23 | #include <string.h> |
24 | #include <float.h> |
25 | #include <stddef.h> |
26 | #ifndef untitled_COMMON_INCLUDES_ |
27 | # define untitled_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 /* untitled_COMMON_INCLUDES_ */ |
38 | |
39 | #include "untitled_types.h" |
40 | |
41 | /* Shared type includes */ |
42 | #include "multiword_types.h" |
43 | |
44 | /* Macros for accessing real-time model data structure */ |
45 | #ifndef rtmGetFinalTime |
46 | # define rtmGetFinalTime(rtm) ((rtm)->Timing.tFinal) |
47 | #endif |
48 | |
49 | #ifndef rtmGetRTWExtModeInfo |
50 | # define rtmGetRTWExtModeInfo(rtm) ((rtm)->extModeInfo) |
51 | #endif |
52 | |
53 | #ifndef rtmGetErrorStatus |
54 | # define rtmGetErrorStatus(rtm) ((rtm)->errorStatus) |
55 | #endif |
56 | |
57 | #ifndef rtmSetErrorStatus |
58 | # define rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val)) |
59 | #endif |
60 | |
61 | #ifndef rtmGetStopRequested |
62 | # define rtmGetStopRequested(rtm) ((rtm)->Timing.stopRequestedFlag) |
63 | #endif |
64 | |
65 | #ifndef rtmSetStopRequested |
66 | # define rtmSetStopRequested(rtm, val) ((rtm)->Timing.stopRequestedFlag = (val)) |
67 | #endif |
68 | |
69 | #ifndef rtmGetStopRequestedPtr |
70 | # define rtmGetStopRequestedPtr(rtm) (&((rtm)->Timing.stopRequestedFlag)) |
71 | #endif |
72 | |
73 | #ifndef rtmGetT |
74 | # define rtmGetT(rtm) ((rtm)->Timing.taskTime0) |
75 | #endif |
76 | |
77 | #ifndef rtmGetTFinal |
78 | # define rtmGetTFinal(rtm) ((rtm)->Timing.tFinal) |
79 | #endif |
80 | |
81 | /* Block states (auto storage) for system '<S1>/i2cWr' */ |
82 | typedef struct { |
83 | freedomk64f_I2CMasterWrite_un_T obj; /* '<S4>/I2C Master Write' */ |
84 | void *I2CMasterWrite_PWORK; /* '<S4>/I2C Master Write' */ |
85 | int8_T i2cWr_SubsysRanBC; /* '<S1>/i2cWr' */ |
86 | } DW_i2cWr_untitled_T; |
87 | |
88 | /* Block signals (auto storage) */ |
89 | typedef struct { |
90 | real32_T Gain[3]; /* '<Root>/Gain' */ |
91 | real32_T Gain2[3]; /* '<Root>/Gain2' */ |
92 | real32_T TrigonometricFunction1; /* '<S2>/Trigonometric Function1' */ |
93 | real32_T Gain3[3]; /* '<Root>/Gain3' */ |
94 | real32_T Sum; /* '<Root>/Sum' */ |
95 | real32_T TrigonometricFunction; /* '<S2>/Trigonometric Function' */ |
96 | real32_T TrigonometricFunction5; /* '<S2>/Trigonometric Function5' */ |
97 | int16_T acc[3]; /* '<Root>/MPU6050' */ |
98 | int16_T gyro[3]; /* '<Root>/MPU6050' */ |
99 | int16_T temp; /* '<Root>/MPU6050' */ |
100 | int16_T DataTypeConversion[7]; /* '<S3>/Data Type Conversion' */ |
101 | uint16_T dataw; /* '<Root>/MPU6050' */ |
102 | } B_untitled_T; |
103 | |
104 | /* Block states (auto storage) for system '<Root>' */ |
105 | typedef struct { |
106 | freedomk64f_I2CMasterRead_unt_T obj; /* '<S3>/I2C Master Read' */ |
107 | struct { |
108 | void *LoggedData; |
109 | } Roll_X_acc_PWORK; /* '<Root>/Roll _X_acc' */ |
110 | |
111 | struct { |
112 | void *LoggedData[3]; |
113 | } Scope_PWORK; /* '<Root>/Scope' */ |
114 | |
115 | struct { |
116 | void *LoggedData; |
117 | } Theta_Y_acc_PWORK; /* '<Root>/Theta _Y_acc' */ |
118 | |
119 | struct { |
120 | void *LoggedData; |
121 | } ToWorkspace_PWORK; /* '<Root>/To Workspace' */ |
122 | |
123 | struct { |
124 | void *LoggedData; |
125 | } Yaw_Z_acc_PWORK; /* '<Root>/Yaw _Z_acc' */ |
126 | |
127 | void *I2CMasterRead_PWORK; /* '<S3>/I2C Master Read' */ |
128 | int8_T i2cRd_SubsysRanBC; /* '<S1>/i2cRd' */ |
129 | uint8_T is_active_c3_untitled; /* '<Root>/MPU6050' */ |
130 | uint8_T is_c3_untitled; /* '<Root>/MPU6050' */ |
131 | uint8_T n; /* '<Root>/MPU6050' */ |
132 | DW_i2cWr_untitled_T i2cWr; /* '<S1>/i2cWr' */ |
133 | } DW_untitled_T; |
134 | |
135 | /* Parameters (auto storage) */ |
136 | struct P_untitled_T_ { |
137 | real_T I2CMasterRead_SampleTime; /* Expression: -1 |
138 | * Referenced by: '<S3>/I2C Master Read' |
139 | */ |
140 | real32_T Gain3_Gain; /* Computed Parameter: Gain3_Gain |
141 | * Referenced by: '<Root>/Gain3' |
142 | */ |
143 | real32_T Constant_Value; /* Computed Parameter: Constant_Value |
144 | * Referenced by: '<Root>/Constant' |
145 | */ |
146 | int16_T datar_Y0; /* Computed Parameter: datar_Y0 |
147 | * Referenced by: '<S3>/datar' |
148 | */ |
149 | int16_T Gain_Gain; /* Computed Parameter: Gain_Gain |
150 | * Referenced by: '<Root>/Gain' |
151 | */ |
152 | int16_T Gain2_Gain; /* Computed Parameter: Gain2_Gain |
153 | * Referenced by: '<Root>/Gain2' |
154 | */ |
155 | int16_T Gain1_Gain; /* Computed Parameter: Gain1_Gain |
156 | * Referenced by: '<Root>/Gain1' |
157 | */ |
158 | }; |
159 | |
160 | /* Real-time Model Data Structure */ |
161 | struct tag_RTM_untitled_T { |
162 | const char_T *errorStatus; |
163 | RTWExtModeInfo *extModeInfo; |
164 | |
165 | /* |
166 | * Sizes: |
167 | * The following substructure contains sizes information |
168 | * for many of the model attributes such as inputs, outputs, |
169 | * dwork, sample times, etc. |
170 | */ |
171 | struct { |
172 | uint32_T checksums[4]; |
173 | } Sizes; |
174 | |
175 | /* |
176 | * SpecialInfo: |
177 | * The following substructure contains special information |
178 | * related to other components that are dependent on RTW. |
179 | */ |
180 | struct { |
181 | const void *mappingInfo; |
182 | } SpecialInfo; |
183 | |
184 | /* |
185 | * Timing: |
186 | * The following substructure contains information regarding |
187 | * the timing information for the model. |
188 | */ |
189 | struct { |
190 | time_T taskTime0; |
191 | uint32_T clockTick0; |
192 | time_T stepSize0; |
193 | time_T tFinal; |
194 | boolean_T stopRequestedFlag; |
195 | } Timing; |
196 | }; |
197 | |
198 | /* Block parameters (auto storage) */ |
199 | extern P_untitled_T untitled_P; |
200 | |
201 | /* Block signals (auto storage) */ |
202 | extern B_untitled_T untitled_B; |
203 | |
204 | /* Block states (auto storage) */ |
205 | extern DW_untitled_T untitled_DW; |
206 | |
207 | /* Model entry point functions */ |
208 | extern void untitled_initialize(void); |
209 | extern void untitled_step(void); |
210 | extern void untitled_terminate(void); |
211 | |
212 | /* Real-time Model object */ |
213 | extern RT_MODEL_untitled_T *const untitled_M; |
214 | |
215 | /*- |
216 | * The generated code includes comments that allow you to trace directly |
217 | * back to the appropriate location in the model. The basic format |
218 | * is <system>/block_name, where system is the system number (uniquely |
219 | * assigned by Simulink) and block_name is the name of the block. |
220 | * |
221 | * Use the MATLAB hilite_system command to trace the generated code back |
222 | * to the model. For example, |
223 | * |
224 | * hilite_system('<S3>') - opens system 3 |
225 | * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3 |
226 | * |
227 | * Here is the system hierarchy for this model |
228 | * |
229 | * '<Root>' : 'untitled' |
230 | * '<S1>' : 'untitled/MPU6050' |
231 | * '<S2>' : 'untitled/Subsystem1' |
232 | * '<S3>' : 'untitled/MPU6050/i2cRd' |
233 | * '<S4>' : 'untitled/MPU6050/i2cWr' |
234 | */ |
235 | #endif /* RTW_HEADER_untitled_h_ */ |
236 | |
237 | /* |
238 | * File trailer for generated code. |
239 | * |
240 | * [EOF] |
241 | */ |
242 | |