/*
 * File: Inverter_000_test.h
 *
 * Code generated for Simulink model 'Inverter_000_test'.
 *
 * Model version                  : 1.126
 * Simulink Coder version         : 8.14 (R2018a) 06-Feb-2018
 * C/C++ source code generated on : Wed Apr 14 17:29:45 2021
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: Texas Instruments->C2000
 * Code generation objectives: Unspecified
 * Validation result: Not run
 */

#ifndef RTW_HEADER_Inverter_000_test_h_
#define RTW_HEADER_Inverter_000_test_h_
#include <math.h>
#include <string.h>
#include <stddef.h>
#ifndef Inverter_000_test_COMMON_INCLUDES_
# define Inverter_000_test_COMMON_INCLUDES_
#include <IQmathLib.h>
#include "rtwtypes.h"
#include "F2837xD_device.h"
#include "F2837xD_gpio.h"
#include "F2837xD_Examples.h"
#include "IQmathLib.h"
#include "MW_c2000DAC.h"
#endif                                 /* Inverter_000_test_COMMON_INCLUDES_ */

#include "Inverter_000_test_types.h"
#include "MW_target_hardware_resources.h"
#include "IQmathLib.h"

/* Macros for accessing real-time model data structure */
#ifndef rtmGetErrorStatus
# define rtmGetErrorStatus(rtm)        ((rtm)->errorStatus)
#endif

#ifndef rtmSetErrorStatus
# define rtmSetErrorStatus(rtm, val)   ((rtm)->errorStatus = (val))
#endif

#ifndef rtmStepTask
# define rtmStepTask(rtm, idx)         ((rtm)->Timing.TaskCounters.TID[(idx)] == 0)
#endif

#ifndef rtmTaskCounter
# define rtmTaskCounter(rtm, idx)      ((rtm)->Timing.TaskCounters.TID[(idx)])
#endif

extern void config_ePWM_GPIO (void);

/* Block signals (default storage) */
typedef struct {
  real32_T RateTransition1;            /* '<Root>/Rate Transition1' */
  real32_T RateTransition5[3];         /* '<Root>/Rate Transition5' */
  int32_T RateTransition60[3];         /* '<Root>/Rate Transition60' */
  boolean_T RelationalOperator2[3];    /* '<Root>/Relational Operator2' */
} B_Inverter_000_test_T;

/* Block states (default storage) for system '<Root>' */
typedef struct {
  int32_T UnitDelay_DSTATE;            /* '<S12>/Unit Delay' */
  real32_T RateTransition1_Buffer0;    /* '<Root>/Rate Transition1' */
} DW_Inverter_000_test_T;

/* Parameters (default storage) */
struct P_Inverter_000_test_T_ {
  real_T FloattoIQN2_P1;               /* Expression: Q_value
                                        * Referenced by: '<S4>/Float to IQN2'
                                        */
  real_T FloattoIQN_P1;                /* Expression: Q_value
                                        * Referenced by: '<S4>/Float to IQN'
                                        */
  real_T FloattoIQN1_P1;               /* Expression: Q_value
                                        * Referenced by: '<S4>/Float to IQN1'
                                        */
  real_T FloattoIQN_P1_j;              /* Expression: Q_value
                                        * Referenced by: '<S11>/Float to IQN'
                                        */
  real_T FloattoIQN1_P1_b;             /* Expression: Q_value
                                        * Referenced by: '<S2>/Float to IQN1'
                                        */
  real_T Constant_Value;               /* Expression: 4096
                                        * Referenced by: '<Root>/Constant'
                                        */
  int32_T Saturation4_UpperSat;        /* Computed Parameter: Saturation4_UpperSat
                                        * Referenced by: '<Root>/Saturation4'
                                        */
  int32_T Saturation4_LowerSat;        /* Computed Parameter: Saturation4_LowerSat
                                        * Referenced by: '<Root>/Saturation4'
                                        */
  int32_T Constant8_Value;             /* Computed Parameter: Constant8_Value
                                        * Referenced by: '<Root>/Constant8'
                                        */
  int32_T Saturation5_UpperSat;        /* Computed Parameter: Saturation5_UpperSat
                                        * Referenced by: '<Root>/Saturation5'
                                        */
  int32_T Saturation5_LowerSat;        /* Computed Parameter: Saturation5_LowerSat
                                        * Referenced by: '<Root>/Saturation5'
                                        */
  int32_T Constant3_Value;             /* Computed Parameter: Constant3_Value
                                        * Referenced by: '<Root>/Constant3'
                                        */
  int32_T Constant11_Value;            /* Computed Parameter: Constant11_Value
                                        * Referenced by: '<S4>/Constant11'
                                        */
  int32_T Constant8_Value_e;           /* Computed Parameter: Constant8_Value_e
                                        * Referenced by: '<S4>/Constant8'
                                        */
  int32_T Constant9_Value;             /* Computed Parameter: Constant9_Value
                                        * Referenced by: '<S4>/Constant9'
                                        */
  int32_T UnitDelay_InitialCondition;  /* Computed Parameter: UnitDelay_InitialCondition
                                        * Referenced by: '<S12>/Unit Delay'
                                        */
  int32_T u_Value;                     /* Computed Parameter: u_Value
                                        * Referenced by: '<S14>/1'
                                        */
  int32_T u_Value_e;                   /* Computed Parameter: u_Value_e
                                        * Referenced by: '<S14>/-1'
                                        */
  int32_T u_Value_f;                   /* Computed Parameter: u_Value_f
                                        * Referenced by: '<S15>/1'
                                        */
  int32_T u_Value_c;                   /* Computed Parameter: u_Value_c
                                        * Referenced by: '<S15>/-1'
                                        */
  int32_T Gain_Gain;                   /* Computed Parameter: Gain_Gain
                                        * Referenced by: '<S2>/Gain'
                                        */
  int32_T Gain_Gain_h;                 /* Computed Parameter: Gain_Gain_h
                                        * Referenced by: '<S5>/Gain'
                                        */
  int32_T Gain1_Gain;                  /* Computed Parameter: Gain1_Gain
                                        * Referenced by: '<S5>/Gain1'
                                        */
  real32_T RateTransition1_InitialConditio;/* Computed Parameter: RateTransition1_InitialConditio
                                            * Referenced by: '<Root>/Rate Transition1'
                                            */
  real32_T Gain3_Gain;                 /* Computed Parameter: Gain3_Gain
                                        * Referenced by: '<S4>/Gain3'
                                        */
  real32_T Constant13_Value;           /* Computed Parameter: Constant13_Value
                                        * Referenced by: '<S4>/Constant13'
                                        */
  real32_T Constant14_Value;           /* Computed Parameter: Constant14_Value
                                        * Referenced by: '<S4>/Constant14'
                                        */
  real32_T Constant10_Value;           /* Computed Parameter: Constant10_Value
                                        * Referenced by: '<S4>/Constant10'
                                        */
  real32_T Gain2_Gain;                 /* Computed Parameter: Gain2_Gain
                                        * Referenced by: '<S4>/Gain2'
                                        */
  real32_T Constant_Value_j;           /* Computed Parameter: Constant_Value_j
                                        * Referenced by: '<S11>/Constant'
                                        */
  real32_T Gain2_Gain_f;               /* Computed Parameter: Gain2_Gain_f
                                        * Referenced by: '<Root>/Gain2'
                                        */
  real32_T Bias1_Bias;                 /* Computed Parameter: Bias1_Bias
                                        * Referenced by: '<Root>/Bias1'
                                        */
  real32_T Constant15_Value;           /* Computed Parameter: Constant15_Value
                                        * Referenced by: '<S1>/Constant15'
                                        */
  real32_T Constant13_Value_a;         /* Computed Parameter: Constant13_Value_a
                                        * Referenced by: '<S1>/Constant13'
                                        */
  real32_T Constant14_Value_m;         /* Computed Parameter: Constant14_Value_m
                                        * Referenced by: '<S1>/Constant14'
                                        */
  real32_T Constant2_Value;            /* Computed Parameter: Constant2_Value
                                        * Referenced by: '<Root>/Constant2'
                                        */
  real32_T Bias2_Bias;                 /* Computed Parameter: Bias2_Bias
                                        * Referenced by: '<Root>/Bias2'
                                        */
  real32_T Constant14_Value_mo;        /* Computed Parameter: Constant14_Value_mo
                                        * Referenced by: '<Root>/Constant14'
                                        */
};

/* Real-time Model Data Structure */
struct tag_RTM_Inverter_000_test_T {
  const char_T *errorStatus;

  /*
   * Timing:
   * The following substructure contains information regarding
   * the timing information for the model.
   */
  struct {
    struct {
      uint8_T TID[2];
    } TaskCounters;

    struct {
      boolean_T TID0_1;
    } RateInteraction;
  } Timing;
};

/* Block parameters (default storage) */
extern P_Inverter_000_test_T Inverter_000_test_P;

/* Block signals (default storage) */
extern B_Inverter_000_test_T Inverter_000_test_B;

/* Block states (default storage) */
extern DW_Inverter_000_test_T Inverter_000_test_DW;

/* External function called from main */
extern void Inverter_000_test_SetEventsForThisBaseStep(boolean_T *eventFlags);

/* Model entry point functions */
extern void Inverter_000_test_SetEventsForThisBaseStep(boolean_T *eventFlags);
extern void Inverter_000_test_initialize(void);
extern void Inverter_000_test_step0(void);
extern void Inverter_000_test_step1(void);
extern void Inverter_000_test_terminate(void);

/* Real-time Model object */
extern RT_MODEL_Inverter_000_test_T *const Inverter_000_test_M;

/*-
 * These blocks were eliminated from the model due to optimizations:
 *
 * Block '<Root>/Rate Transition61' : Unused code path elimination
 * Block '<Root>/Rate Transition62' : Unused code path elimination
 * Block '<S17>/Data Type Duplicate' : Unused code path elimination
 * Block '<Root>/Rate Transition4' : Eliminated since input and output rates are identical
 * Block '<S17>/Conversion' : Eliminate redundant data type conversion
 */

/*-
 * The generated code includes comments that allow you to trace directly
 * back to the appropriate location in the model.  The basic format
 * is <system>/block_name, where system is the system number (uniquely
 * assigned by Simulink) and block_name is the name of the block.
 *
 * Use the MATLAB hilite_system command to trace the generated code back
 * to the model.  For example,
 *
 * hilite_system('<S3>')    - opens system 3
 * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
 *
 * Here is the system hierarchy for this model
 *
 * '<Root>' : 'Inverter_000_test'
 * '<S1>'   : 'Inverter_000_test/InverterPWM'
 * '<S2>'   : 'Inverter_000_test/Modulation1'
 * '<S3>'   : 'Inverter_000_test/Modulation3'
 * '<S4>'   : 'Inverter_000_test/Reference'
 * '<S5>'   : 'Inverter_000_test/Modulation1/Carrier1'
 * '<S6>'   : 'Inverter_000_test/Modulation1/Carrier2'
 * '<S7>'   : 'Inverter_000_test/Modulation1/Carrier1/MATLAB Function'
 * '<S8>'   : 'Inverter_000_test/Modulation1/Carrier2/MATLAB Function'
 * '<S9>'   : 'Inverter_000_test/Modulation1/Carrier2/MATLAB Function1'
 * '<S10>'  : 'Inverter_000_test/Modulation3/Carrier1'
 * '<S11>'  : 'Inverter_000_test/Reference/Inverse Park Transformation'
 * '<S12>'  : 'Inverter_000_test/Reference/Ramp Generator1'
 * '<S13>'  : 'Inverter_000_test/Reference/Ramp Generator1/Convert Param To fix-pt with floor  rounding mode'
 * '<S14>'  : 'Inverter_000_test/Reference/Ramp Generator1/Subsystem'
 * '<S15>'  : 'Inverter_000_test/Reference/Ramp Generator1/Subsystem1'
 * '<S16>'  : 'Inverter_000_test/Reference/Ramp Generator1/Convert Param To fix-pt with floor  rounding mode/Embedded MATLAB Function'
 * '<S17>'  : 'Inverter_000_test/Reference/Ramp Generator1/Subsystem/Data Type Conversion Inherited'
 */
#endif                                 /* RTW_HEADER_Inverter_000_test_h_ */

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
