| 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: TwoPhaseForStuck.h |
| 7 | * |
| 8 | * Code generated for Simulink model 'TwoPhaseForStuck'. |
| 9 | * |
| 10 | * Model version : 1.138 |
| 11 | * Simulink Coder version : 9.0 (R2018b) 24-May-2018 |
| 12 | * C/C++ source code generated on : Tue Dec 8 01:36:02 2020 |
| 13 | * |
| 14 | * Target selection: ert.tlc |
| 15 | * Embedded hardware selection: Texas Instruments->C2000 |
| 16 | * Code generation objectives: Unspecified |
| 17 | * Validation result: Not run |
| 18 | */ |
| 19 | |
| 20 | #ifndef RTW_HEADER_TwoPhaseForStuck_h_ |
| 21 | #define RTW_HEADER_TwoPhaseForStuck_h_ |
| 22 | #include <stddef.h> |
| 23 | #include <string.h> |
| 24 | #ifndef TwoPhaseForStuck_COMMON_INCLUDES_ |
| 25 | # define TwoPhaseForStuck_COMMON_INCLUDES_ |
| 26 | #include "rtwtypes.h" |
| 27 | #include "c2000BoardSupport.h" |
| 28 | #include "F2837xD_device.h" |
| 29 | #include "F2837xD_Examples.h" |
| 30 | #include "IQmathLib.h" |
| 31 | #endif /* TwoPhaseForStuck_COMMON_INCLUDES_ */ |
| 32 | |
| 33 | #include "TwoPhaseForStuck_types.h" |
| 34 | #include "MW_target_hardware_resources.h" |
| 35 | |
| 36 | /* Macros for accessing real-time model data structure */ |
| 37 | #ifndef rtmGetErrorStatus |
| 38 | # define rtmGetErrorStatus(rtm) ((rtm)->errorStatus) |
| 39 | #endif |
| 40 | |
| 41 | #ifndef rtmSetErrorStatus |
| 42 | # define rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val)) |
| 43 | #endif |
| 44 | |
| 45 | extern void config_ePWM_GPIO (void); |
| 46 | |
| 47 | /* Block signals (default storage) */ |
| 48 | typedef struct { |
| 49 | uint16_T ADC; /* '<Root>/ADC' */ |
| 50 | uint16_T ADC_1; /* '<Root>/ADC_1' */ |
| 51 | uint16_T ADC_2; /* '<Root>/ADC_2' */ |
| 52 | } B_TwoPhaseForStuck_T; |
| 53 | |
| 54 | /* Parameters (default storage) */ |
| 55 | struct P_TwoPhaseForStuck_T_ { |
| 56 | real_T DuryCycle_Value; /* Expression: 0.25 |
| 57 | * Referenced by: '<Root>/DuryCycle' |
| 58 | */ |
| 59 | real_T TMPRRD_Gain; /* Expression: 999 |
| 60 | * Referenced by: '<Root>/TMPRRD' |
| 61 | */ |
| 62 | real_T Phase_2_Value; /* Expression: 999/2 |
| 63 | * Referenced by: '<Root>/Phase_2' |
| 64 | */ |
| 65 | }; |
| 66 | |
| 67 | /* Real-time Model Data Structure */ |
| 68 | struct tag_RTM_TwoPhaseForStuck_T { |
| 69 | const char_T *errorStatus; |
| 70 | }; |
| 71 | |
| 72 | /* Block parameters (default storage) */ |
| 73 | extern P_TwoPhaseForStuck_T TwoPhaseForStuck_P; |
| 74 | |
| 75 | /* Block signals (default storage) */ |
| 76 | extern B_TwoPhaseForStuck_T TwoPhaseForStuck_B; |
| 77 | |
| 78 | /* Model entry point functions */ |
| 79 | extern void TwoPhaseForStuck_initialize(void); |
| 80 | extern void TwoPhaseForStuck_step(void); |
| 81 | extern void TwoPhaseForStuck_terminate(void); |
| 82 | |
| 83 | /* Real-time Model object */ |
| 84 | extern RT_MODEL_TwoPhaseForStuck_T *const TwoPhaseForStuck_M; |
| 85 | |
| 86 | /*- |
| 87 | * These blocks were eliminated from the model due to optimizations: |
| 88 | * |
| 89 | * Block '<Root>/Scope1' : Unused code path elimination |
| 90 | * Block '<Root>/Scope2' : Unused code path elimination |
| 91 | * Block '<Root>/Scope6' : Unused code path elimination |
| 92 | * Block '<Root>/Sum1' : Unused code path elimination |
| 93 | * Block '<Root>/Sum15' : Unused code path elimination |
| 94 | * Block '<Root>/Sum16' : Unused code path elimination |
| 95 | * Block '<Root>/gainADC' : Unused code path elimination |
| 96 | * Block '<Root>/gainADC1' : Unused code path elimination |
| 97 | * Block '<Root>/gainADC2' : Unused code path elimination |
| 98 | * Block '<Root>/gainDAC' : Unused code path elimination |
| 99 | * Block '<Root>/gainDAC1' : Unused code path elimination |
| 100 | * Block '<Root>/gainDAC2' : Unused code path elimination |
| 101 | * Block '<Root>/offset' : Unused code path elimination |
| 102 | * Block '<Root>/offset1' : Unused code path elimination |
| 103 | * Block '<Root>/offset2' : Unused code path elimination |
| 104 | */ |
| 105 | |
| 106 | /*- |
| 107 | * The generated code includes comments that allow you to trace directly |
| 108 | * back to the appropriate location in the model. The basic format |
| 109 | * is <system>/block_name, where system is the system number (uniquely |
| 110 | * assigned by Simulink) and block_name is the name of the block. |
| 111 | * |
| 112 | * Use the MATLAB hilite_system command to trace the generated code back |
| 113 | * to the model. For example, |
| 114 | * |
| 115 | * hilite_system('<S3>') - opens system 3 |
| 116 | * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3 |
| 117 | * |
| 118 | * Here is the system hierarchy for this model |
| 119 | * |
| 120 | * '<Root>' : 'TwoPhaseForStuck' |
| 121 | */ |
| 122 | #endif /* RTW_HEADER_TwoPhaseForStuck_h_ */ |
| 123 | |
| 124 | /* |
| 125 | * File trailer for generated code. |
| 126 | * |
| 127 | * [EOF] |
| 128 | */ |
| 129 |