/*
 * File: PMSM_Controller.h
 *
 * Code generated for Simulink model 'PMSM_Controller'.
 *
 * Model version                  : 1.1529
 * Simulink Coder version         : 9.4 (R2020b) 29-Jul-2020
 * C/C++ source code generated on : Tue Aug  2 19:43:20 2022
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: ARM Compatible->ARM Cortex-M
 * Code generation objectives:
 *    1. Execution efficiency
 *    2. RAM efficiency
 * Validation result: Not run
 */

#ifndef RTW_HEADER_PMSM_Controller_h_
#define RTW_HEADER_PMSM_Controller_h_
#include "rtwtypes.h"
#include "zero_crossing_types.h"
#ifndef PMSM_Controller_COMMON_INCLUDES_
#define PMSM_Controller_COMMON_INCLUDES_
#include "rtwtypes.h"
#include "zero_crossing_types.h"
#endif                                 /* PMSM_Controller_COMMON_INCLUDES_ */

/* Model Code Variants */

/* 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

/* Forward declaration for rtModel */
typedef struct tag_RTM RT_MODEL;

/* Block signals and states (default storage) for system '<S39>/Low_Pass_Filter' */
typedef struct {
  int32_T UnitDelay1_DSTATE[2];        /* '<S47>/UnitDelay1' */
} DW_Low_Pass_Filter;

/* Block signals and states (default storage) for system '<S79>/PI_Speed' */
typedef struct {
  int32_T UnitDelay_DSTATE;            /* '<S81>/UnitDelay' */
  int32_T ResettableDelay_DSTATE;      /* '<S82>/Resettable Delay' */
  uint8_T icLoad;                      /* '<S82>/Resettable Delay' */
} DW_PI_backCalc_fixdt;

/* Zero-crossing (trigger) state for system '<S79>/PI_Speed' */
typedef struct {
  ZCSigState ResettableDelay_Reset_ZCE_fm;/* '<S82>/Resettable Delay' */
} ZCE_PI_backCalc_fixdt;

/* Block signals and states (default storage) for system '<S85>/PI_backCalc_fixdt' */
typedef struct {
  int32_T UnitDelay_DSTATE;            /* '<S90>/UnitDelay' */
  int32_T ResettableDelay_DSTATE;      /* '<S92>/Resettable Delay' */
  uint8_T icLoad;                      /* '<S92>/Resettable Delay' */
} DW_PI_backCalc_fixdt_j;

/* Zero-crossing (trigger) state for system '<S85>/PI_backCalc_fixdt' */
typedef struct {
  ZCSigState ResettableDelay_Reset_ZCE;/* '<S92>/Resettable Delay' */
} ZCE_PI_backCalc_fixdt_n;

/* Block signals and states (default storage) for system '<Root>' */
typedef struct {
  DW_PI_backCalc_fixdt_j PI_backCalc_fixdt1;/* '<S85>/PI_backCalc_fixdt1' */
  DW_PI_backCalc_fixdt_j PI_backCalc_fixdt_ig;/* '<S85>/PI_backCalc_fixdt' */
  DW_PI_backCalc_fixdt PI_Speed;       /* '<S79>/PI_Speed' */
  DW_Low_Pass_Filter Low_Pass_Filter_e;/* '<S68>/Low_Pass_Filter' */
  DW_Low_Pass_Filter Low_Pass_Filter_l;/* '<S39>/Low_Pass_Filter' */
  int32_T Divide11;                    /* '<S29>/Divide11' */
  int32_T UnitDelay_DSTATE_l;          /* '<S69>/Unit Delay' */
  int32_T ResettableDelay_DSTATE;      /* '<S70>/Resettable Delay' */
  uint32_T OutportBufferFordelta_count;
  uint32_T i_count;                    /* '<S16>/i_count' */
  uint32_T Switch4;                    /* '<S29>/Switch4' */
  uint32_T UnitDelay1_DSTATE;          /* '<S38>/UnitDelay1' */
  uint32_T UnitDelay_DSTATE;           /* '<S29>/Unit Delay' */
  uint32_T UnitDelay2_DSTATE;          /* '<S29>/UnitDelay2' */
  uint32_T UnitDelay3_DSTATE;          /* '<S29>/UnitDelay3' */
  uint32_T UnitDelay5_DSTATE;          /* '<S29>/UnitDelay5' */
  uint32_T UnitDelay4_DSTATE;          /* '<S20>/UnitDelay4' */
  uint32_T UnitDelay4_DSTATE_o;        /* '<S29>/UnitDelay4' */
  int16_T Switch[2];                   /* '<S111>/Switch' */
  int16_T Merge_i[2];                  /* '<S67>/Merge' */
  int16_T UnitDelay_DSTATE_k[2];       /* '<S1>/Unit Delay' */
  int16_T UnitDelay1_DSTATE_o[2];      /* '<S35>/UnitDelay1' */
  int16_T UnitDelay_DSTATE_e[2];       /* '<S4>/Unit Delay' */
  int16_T Divide;                      /* '<S120>/Divide' */
  int16_T Divide_o;                    /* '<S116>/Divide' */
  int16_T Max;                         /* '<S120>/Max' */
  int16_T Max1;                        /* '<S120>/Max1' */
  int16_T Max_l;                       /* '<S116>/Max' */
  int16_T Max1_j;                      /* '<S116>/Max1' */
  int16_T Max_p;                       /* '<S106>/Max' */
  int16_T Max1_i;                      /* '<S106>/Max1' */
  int16_T Max_i;                       /* '<S99>/Max' */
  int16_T Max1_e;                      /* '<S99>/Max1' */
  int16_T Merge;                       /* '<S65>/Merge' */
  int16_T Switch_p;                    /* '<S68>/Switch' */
  int16_T Switch2;                     /* '<S76>/Switch2' */
  int16_T Divide_g;                    /* '<S106>/Divide' */
  int16_T Divide_d;                    /* '<S99>/Divide' */
  int16_T UnitDelay_DSTATE_l5;         /* '<S96>/UnitDelay' */
  int16_T UnitDelay1_DSTATE_j;         /* '<S87>/Unit Delay1' */
  int16_T UnitDelay_DSTATE_g;          /* '<S102>/UnitDelay' */
  int16_T UnitDelay_DSTATE_b;          /* '<S98>/Unit Delay' */
  int16_T UnitDelay_DSTATE_er;         /* '<S103>/UnitDelay' */
  int16_T UnitDelay1_DSTATE_p;         /* '<S88>/Unit Delay1' */
  int16_T UnitDelay_DSTATE_o;          /* '<S109>/UnitDelay' */
  int16_T UnitDelay_DSTATE_d;          /* '<S105>/Unit Delay' */
  int16_T UnitDelay_DSTATE_lz;         /* '<S112>/UnitDelay' */
  int16_T UnitDelay_DSTATE_j;          /* '<S119>/UnitDelay' */
  int16_T UnitDelay_DSTATE_h;          /* '<S113>/Unit Delay' */
  int16_T UnitDelay_DSTATE_n;          /* '<S114>/UnitDelay' */
  int16_T UnitDelay_DSTATE_ox;         /* '<S123>/UnitDelay' */
  int16_T UnitDelay_DSTATE_gt;         /* '<S115>/Unit Delay' */
  int16_T UnitDelay1_DSTATE_jp;        /* '<S62>/Unit Delay1' */
  int16_T Delay_DSTATE;                /* '<S80>/Delay' */
  int16_T UnitDelay_DSTATE_di;         /* '<S79>/Unit Delay' */
  uint16_T UnitDelay2_DSTATE_o;        /* '<S28>/UnitDelay2' */
  uint16_T UnitDelay3_DSTATE_p;        /* '<S28>/UnitDelay3' */
  uint16_T UnitDelay5_DSTATE_m;        /* '<S28>/UnitDelay5' */
  uint16_T UnitDelay_DSTATE_i;         /* '<S13>/UnitDelay' */
  uint16_T UnitDelay_DSTATE_m;         /* '<S15>/UnitDelay' */
  uint16_T UnitDelay1_DSTATE_pl;       /* '<S66>/Unit Delay1' */
  int8_T UnitDelay3;                   /* '<S16>/UnitDelay3' */
  int8_T Switch2_o;                    /* '<S16>/Switch2' */
  int8_T UnitDelay2_DSTATE_i;          /* '<S16>/UnitDelay2' */
  int8_T If_ActiveSubsystem_k;         /* '<S65>/If' */
  uint8_T Delay_DSTATE_p;              /* '<S17>/Delay' */
  uint8_T Delay1_DSTATE;               /* '<S17>/Delay1' */
  uint8_T Delay2_DSTATE;               /* '<S17>/Delay2' */
  uint8_T UnitDelay_DSTATE_p;          /* '<S5>/UnitDelay' */
  uint8_T UnitDelay_DSTATE_h3;         /* '<S45>/Unit Delay' */
  uint8_T UnitDelay_DSTATE_lv;         /* '<S62>/Unit Delay' */
  uint8_T UnitDelay1_DSTATE_k;         /* '<S29>/Unit Delay1' */
  uint8_T is_active_c11_PMSM_Controller;/* '<S36>/Control_Mode_Manager' */
  uint8_T is_c11_PMSM_Controller;      /* '<S36>/Control_Mode_Manager' */
  uint8_T is_ACTIVE;                   /* '<S36>/Control_Mode_Manager' */
  uint8_T icLoad;                      /* '<S70>/Resettable Delay' */
  uint8_T icLoad_i;                    /* '<S80>/Delay' */
  boolean_T UnitDelay_DSTATE_gv;       /* '<S6>/UnitDelay' */
  boolean_T UnitDelay_DSTATE_oy;       /* '<S10>/UnitDelay' */
  boolean_T UnitDelay_DSTATE_f;        /* '<S7>/UnitDelay' */
  boolean_T UnitDelay1_DSTATE_m;       /* '<S29>/UnitDelay1' */
  boolean_T n_SpeedCtrl_Mode;          /* '<S36>/n_SpeedCtrl' */
  boolean_T dz_cntTrnsDet_Mode;        /* '<S29>/dz_cntTrnsDet' */
  boolean_T n_commDeacv_Mode;          /* '<S28>/n_commDeacv' */
} DW;

/* Zero-crossing (trigger) state */
typedef struct {
  ZCE_PI_backCalc_fixdt_n PI_backCalc_fixdt1;/* '<S85>/PI_backCalc_fixdt1' */
  ZCE_PI_backCalc_fixdt_n PI_backCalc_fixdt_ig;/* '<S85>/PI_backCalc_fixdt' */
  ZCSigState ResettableDelay_Reset_ZCE_f;/* '<S70>/Resettable Delay' */
  ZCE_PI_backCalc_fixdt PI_Speed;      /* '<S79>/PI_Speed' */
} PrevZCX;

/* Constant parameters (default storage) */
typedef struct {
  /* Pooled Parameter (Expression: r_sin_M1)
   * Referenced by:
   *   '<S49>/r_sin_M1'
   *   '<S74>/r_sin_M1'
   */
  int16_T pooled12[361];

  /* Pooled Parameter (Expression: r_cos_M1)
   * Referenced by:
   *   '<S49>/r_cos_M1'
   *   '<S74>/r_cos_M1'
   */
  int16_T pooled13[361];

  /* Computed Parameter: vec_hallToPos_Value
   * Referenced by: '<S19>/vec_hallToPos'
   */
  int8_T vec_hallToPos_Value[8];
} ConstP;

/* External inputs (root inport signals with default storage) */
typedef struct {
  int16_T adc_Phase[3];                /* '<Root>/adc_Phase' */
  uint8_T hall_abc[3];                 /* '<Root>/hall_abc' */
  int32_T spd_Target;                  /* '<Root>/spd_Target' */
  int16_T idq_Target;                  /* '<Root>/idq_Target' */
  int16_T vdq_Target[2];               /* '<Root>/vdq_Target' */
  int16_T idq_Limit;                   /* '<Root>/idq_Limit' */
  boolean_T b_motEna;                  /* '<Root>/b_motEna' */
  boolean_T b_cruiseEna;               /* '<Root>/b_cruiseEna' */
  uint8_T n_ctrlMod;                   /* '<Root>/n_ctrlMod' */
  int16_T iDC_Limit;                   /* '<Root>/iDC_Limit' */
  int32_T spd_Limit;                   /* '<Root>/spd_Limit' */
  int16_T vDC;                         /* '<Root>/vDC' */
  uint32_T sys_ticks;                  /* '<Root>/sys_ticks' */
  int16_T set_Angle;                   /* '<Root>/set_Angle' */
} ExtU;

/* External outputs (root outports fed by signals with default storage) */
typedef struct {
  int16_T n_Duty[3];                   /* '<Root>/n_Duty' */
  uint8_T n_Sector;                    /* '<Root>/n_Sector' */
  uint8_T n_MotError;                  /* '<Root>/n_MotError' */
  int16_T f_Vdq[2];                    /* '<Root>/f_Vdq' */
  int16_T f_Idq[2];                    /* '<Root>/f_Idq' */
  int16_T f_MotAngle;                  /* '<Root>/f_MotAngle' */
  int32_T f_MotRPM;                    /* '<Root>/f_MotRPM' */
  uint8_T n_hallStat;                  /* '<Root>/n_hallStat' */
  uint8_T n_FocMode;                   /* '<Root>/n_FocMode' */
  boolean_T b_advCtrl;                 /* '<Root>/b_advCtrl' */
} ExtY;

/* Parameters (default storage) */
struct P_ {
  int16_T cf_Fw_Kb;                    /* Variable: cf_Fw_Kb
                                        * Referenced by: '<S66>/Constant5'
                                        */
  int16_T cf_Fw_Ki;                    /* Variable: cf_Fw_Ki
                                        * Referenced by: '<S66>/Constant2'
                                        */
  int16_T cf_idKp;                     /* Variable: cf_idKp
                                        * Referenced by: '<S85>/Constant3'
                                        */
  int16_T cf_iqKp;                     /* Variable: cf_iqKp
                                        * Referenced by: '<S85>/Constant7'
                                        */
  int16_T cf_nKp;                      /* Variable: cf_nKp
                                        * Referenced by: '<S79>/Constant4'
                                        */
  int16_T V_modulation;                /* Variable: V_modulation
                                        * Referenced by:
                                        *   '<S42>/Constant'
                                        *   '<S85>/Constant2'
                                        *   '<S66>/Constant3'
                                        */
  int16_T cf_idKb;                     /* Variable: cf_idKb
                                        * Referenced by: '<S85>/Constant6'
                                        */
  int16_T cf_idKi;                     /* Variable: cf_idKi
                                        * Referenced by: '<S85>/Constant4'
                                        */
  int16_T cf_iqKb;                     /* Variable: cf_iqKb
                                        * Referenced by: '<S85>/Constant1'
                                        */
  int16_T cf_iqKi;                     /* Variable: cf_iqKi
                                        * Referenced by: '<S85>/Constant8'
                                        */
  int16_T cf_nKb;                      /* Variable: cf_nKb
                                        * Referenced by: '<S79>/Constant11'
                                        */
  int16_T cf_nKi;                      /* Variable: cf_nKi
                                        * Referenced by: '<S79>/Constant1'
                                        */
  int16_T f_adc_curr_ceof;             /* Variable: f_adc_curr_ceof
                                        * Referenced by: '<S43>/Constant'
                                        */
  int16_T cf_lastIqGain;               /* Variable: cf_lastIqGain
                                        * Referenced by: '<S62>/Gain'
                                        */
  int16_T i_hall_offset;               /* Variable: i_hall_offset
                                        * Referenced by: '<S22>/Constant2'
                                        */
  int16_T i_dqMax;                     /* Variable: i_dqMax
                                        * Referenced by:
                                        *   '<S68>/Constant1'
                                        *   '<S68>/Constant2'
                                        *   '<S68>/Constant3'
                                        *   '<S68>/Constant5'
                                        *   '<S79>/Constant6'
                                        */
  int16_T id_fieldWeakMax;             /* Variable: id_fieldWeakMax
                                        * Referenced by: '<S66>/Constant6'
                                        */
  int16_T dz_OpenStepVol;              /* Variable: dz_OpenStepVol
                                        * Referenced by:
                                        *   '<S111>/Constant1'
                                        *   '<S111>/Constant5'
                                        */
  uint16_T f_lpf_idq;                  /* Variable: f_lpf_idq
                                        * Referenced by: '<S39>/Constant'
                                        */
  uint16_T f_lpf_vdq;                  /* Variable: f_lpf_vdq
                                        * Referenced by: '<S68>/Constant'
                                        */
  uint16_T i_pwm_count;                /* Variable: i_pwm_count
                                        * Referenced by: '<S53>/Constant1'
                                        */
  uint8_T n_polePairs;                 /* Variable: n_polePairs
                                        * Referenced by: '<S29>/polePairs'
                                        */
};

/* Parameters (default storage) */
typedef struct P_ P;

/* Real-time Model Data Structure */
struct tag_RTM {
  const char_T * volatile errorStatus;
  PrevZCX *prevZCSigState;
  ExtU *inputs;
  ExtY *outputs;
  DW *dwork;
};

/* Block parameters (default storage) */
extern P rtP;

/* Constant parameters (default storage) */
extern const ConstP rtConstP;

/* Model entry point functions */
extern void PMSM_Controller_initialize(RT_MODEL *const rtM);
extern void PMSM_Controller_step(RT_MODEL *const rtM);

/*-
 * These blocks were eliminated from the model due to optimizations:
 *
 * Block '<S19>/Scope' : Unused code path elimination
 * Block '<S3>/Scope' : Unused code path elimination
 * Block '<S20>/Logical Operator4' : Unused code path elimination
 * Block '<S29>/Scope' : Unused code path elimination
 * Block '<S20>/Scope1' : Unused code path elimination
 * Block '<S20>/Scope2' : Unused code path elimination
 * Block '<S46>/Scope' : Unused code path elimination
 * Block '<S39>/Scope' : Unused code path elimination
 * Block '<S49>/Scope' : Unused code path elimination
 * Block '<S40>/Constant1' : Unused code path elimination
 * Block '<S40>/Min' : Unused code path elimination
 * Block '<S50>/Data Type Duplicate' : Unused code path elimination
 * Block '<S50>/Data Type Propagation' : Unused code path elimination
 * Block '<S51>/Data Type Duplicate' : Unused code path elimination
 * Block '<S51>/Data Type Propagation' : Unused code path elimination
 * Block '<S52>/Scope' : Unused code path elimination
 * Block '<S61>/Scope' : Unused code path elimination
 * Block '<S42>/Scope' : Unused code path elimination
 * Block '<S71>/Data Type Duplicate' : Unused code path elimination
 * Block '<S71>/Data Type Propagation' : Unused code path elimination
 * Block '<S74>/Scope' : Unused code path elimination
 * Block '<S76>/Data Type Duplicate' : Unused code path elimination
 * Block '<S76>/Data Type Propagation' : Unused code path elimination
 * Block '<S77>/Data Type Duplicate' : Unused code path elimination
 * Block '<S77>/Data Type Propagation' : Unused code path elimination
 * Block '<S83>/Data Type Duplicate' : Unused code path elimination
 * Block '<S83>/Data Type Propagation' : Unused code path elimination
 * Block '<S84>/Data Type Duplicate' : Unused code path elimination
 * Block '<S84>/Data Type Propagation' : Unused code path elimination
 * Block '<S93>/Data Type Duplicate' : Unused code path elimination
 * Block '<S93>/Data Type Propagation' : Unused code path elimination
 * Block '<S95>/Data Type Duplicate' : Unused code path elimination
 * Block '<S95>/Data Type Propagation' : Unused code path elimination
 * Block '<S45>/Scope' : Unused code path elimination
 * Block '<S100>/Data Type Duplicate' : Unused code path elimination
 * Block '<S100>/Data Type Propagation' : Unused code path elimination
 * Block '<S107>/Data Type Duplicate' : Unused code path elimination
 * Block '<S107>/Data Type Propagation' : Unused code path elimination
 * Block '<S4>/Scope' : Unused code path elimination
 * Block '<S37>/Scope' : Unused code path elimination
 * Block '<S117>/Data Type Duplicate' : Unused code path elimination
 * Block '<S117>/Data Type Propagation' : Unused code path elimination
 * Block '<S121>/Data Type Duplicate' : Unused code path elimination
 * Block '<S121>/Data Type Propagation' : Unused code path elimination
 * Block '<S1>/Data Type Conversion4' : Eliminate redundant data type conversion
 * Block '<S1>/Data Type Conversion6' : Eliminate redundant data type conversion
 * Block '<S1>/Data Type Conversion7' : Eliminate redundant data type conversion
 * Block '<S70>/Data Type Conversion1' : Eliminate redundant data type conversion
 * Block '<S72>/Data Type Conversion' : Eliminate redundant data type conversion
 * Block '<S36>/Data Type Conversion' : Eliminate redundant data type conversion
 * Block '<S66>/Constant1' : Unused code path elimination
 * Block '<S89>/Add' : Unused code path elimination
 * Block '<S89>/Constant1' : Unused code path elimination
 * Block '<S89>/Constant3' : Unused code path elimination
 * Block '<S89>/Constant4' : Unused code path elimination
 * Block '<S89>/Constant5' : Unused code path elimination
 * Block '<S89>/Constant6' : Unused code path elimination
 * Block '<S89>/Divide' : Unused code path elimination
 * Block '<S89>/Divide1' : Unused code path elimination
 * Block '<S89>/Divide2' : Unused code path elimination
 * Block '<S89>/Divide4' : Unused code path elimination
 * Block '<S89>/Gain' : Unused code path elimination
 * Block '<S85>/Gain' : Unused code path elimination
 */

/*-
 * 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.
 *
 * Note that this particular code originates from a subsystem build,
 * and has its own system numbers different from the parent model.
 * Refer to the system hierarchy for this subsystem below, and use the
 * MATLAB hilite_system command to trace the generated code back
 * to the parent model.  For example,
 *
 * hilite_system('MotorController_FOC_hall/PMSM_Controller')    - opens subsystem MotorController_FOC_hall/PMSM_Controller
 * hilite_system('MotorController_FOC_hall/PMSM_Controller/Kp') - opens and selects block Kp
 *
 * Here is the system hierarchy for this model
 *
 * '<Root>' : 'MotorController_FOC_hall'
 * '<S1>'   : 'MotorController_FOC_hall/PMSM_Controller'
 * '<S2>'   : 'MotorController_FOC_hall/PMSM_Controller/Diagnostics'
 * '<S3>'   : 'MotorController_FOC_hall/PMSM_Controller/Hall_Estimation'
 * '<S4>'   : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC'
 * '<S5>'   : 'MotorController_FOC_hall/PMSM_Controller/Diagnostics/Diagnostics_Enabled'
 * '<S6>'   : 'MotorController_FOC_hall/PMSM_Controller/Diagnostics/Diagnostics_Enabled/Debounce_Filter'
 * '<S7>'   : 'MotorController_FOC_hall/PMSM_Controller/Diagnostics/Diagnostics_Enabled/Edge'
 * '<S8>'   : 'MotorController_FOC_hall/PMSM_Controller/Diagnostics/Diagnostics_Enabled/Debounce_Filter/Default'
 * '<S9>'   : 'MotorController_FOC_hall/PMSM_Controller/Diagnostics/Diagnostics_Enabled/Debounce_Filter/Dequalification'
 * '<S10>'  : 'MotorController_FOC_hall/PMSM_Controller/Diagnostics/Diagnostics_Enabled/Debounce_Filter/Edge'
 * '<S11>'  : 'MotorController_FOC_hall/PMSM_Controller/Diagnostics/Diagnostics_Enabled/Debounce_Filter/Qualification'
 * '<S12>'  : 'MotorController_FOC_hall/PMSM_Controller/Diagnostics/Diagnostics_Enabled/Debounce_Filter/Dequalification/Rst_Counter'
 * '<S13>'  : 'MotorController_FOC_hall/PMSM_Controller/Diagnostics/Diagnostics_Enabled/Debounce_Filter/Dequalification/Rst_Counter/rst_Delay1'
 * '<S14>'  : 'MotorController_FOC_hall/PMSM_Controller/Diagnostics/Diagnostics_Enabled/Debounce_Filter/Qualification/Rst_Counter'
 * '<S15>'  : 'MotorController_FOC_hall/PMSM_Controller/Diagnostics/Diagnostics_Enabled/Debounce_Filter/Qualification/Rst_Counter/rst_Delay1'
 * '<S16>'  : 'MotorController_FOC_hall/PMSM_Controller/Hall_Estimation/Direction_Detection'
 * '<S17>'  : 'MotorController_FOC_hall/PMSM_Controller/Hall_Estimation/Edge_Detect'
 * '<S18>'  : 'MotorController_FOC_hall/PMSM_Controller/Hall_Estimation/Electrical_Angle_Estimation'
 * '<S19>'  : 'MotorController_FOC_hall/PMSM_Controller/Hall_Estimation/Hall_Angle_Raw'
 * '<S20>'  : 'MotorController_FOC_hall/PMSM_Controller/Hall_Estimation/Speed_Estimation'
 * '<S21>'  : 'MotorController_FOC_hall/PMSM_Controller/Hall_Estimation/Electrical_Angle_Estimation/Delta'
 * '<S22>'  : 'MotorController_FOC_hall/PMSM_Controller/Hall_Estimation/Electrical_Angle_Estimation/degree_rad'
 * '<S23>'  : 'MotorController_FOC_hall/PMSM_Controller/Hall_Estimation/Electrical_Angle_Estimation/Delta/normal'
 * '<S24>'  : 'MotorController_FOC_hall/PMSM_Controller/Hall_Estimation/Electrical_Angle_Estimation/Delta/wrapper'
 * '<S25>'  : 'MotorController_FOC_hall/PMSM_Controller/Hall_Estimation/Electrical_Angle_Estimation/degree_rad/If Action Subsystem'
 * '<S26>'  : 'MotorController_FOC_hall/PMSM_Controller/Hall_Estimation/Electrical_Angle_Estimation/degree_rad/If Action Subsystem1'
 * '<S27>'  : 'MotorController_FOC_hall/PMSM_Controller/Hall_Estimation/Electrical_Angle_Estimation/degree_rad/If Action Subsystem2'
 * '<S28>'  : 'MotorController_FOC_hall/PMSM_Controller/Hall_Estimation/Speed_Estimation/AdvCtrlDetect'
 * '<S29>'  : 'MotorController_FOC_hall/PMSM_Controller/Hall_Estimation/Speed_Estimation/Raw_Motor_Speed_Estimation'
 * '<S30>'  : 'MotorController_FOC_hall/PMSM_Controller/Hall_Estimation/Speed_Estimation/AdvCtrlDetect/Compare To Constant'
 * '<S31>'  : 'MotorController_FOC_hall/PMSM_Controller/Hall_Estimation/Speed_Estimation/Raw_Motor_Speed_Estimation/Delta'
 * '<S32>'  : 'MotorController_FOC_hall/PMSM_Controller/Hall_Estimation/Speed_Estimation/Raw_Motor_Speed_Estimation/Delta/normal'
 * '<S33>'  : 'MotorController_FOC_hall/PMSM_Controller/Hall_Estimation/Speed_Estimation/Raw_Motor_Speed_Estimation/Delta/wrapper'
 * '<S34>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Call_Schduler'
 * '<S35>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core'
 * '<S36>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Ctrl_Mode_Transition'
 * '<S37>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Target_Scale'
 * '<S38>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Call_Schduler/counter'
 * '<S39>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/Clarke_Park'
 * '<S40>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/Motor_Limitation'
 * '<S41>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/SVM'
 * '<S42>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/circle_limiter'
 * '<S43>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/current_sample'
 * '<S44>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc'
 * '<S45>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc'
 * '<S46>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/Clarke_Park/Clarke'
 * '<S47>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/Clarke_Park/Low_Pass_Filter'
 * '<S48>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/Clarke_Park/Park'
 * '<S49>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/Clarke_Park/Sine_Cosine_Approximation'
 * '<S50>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/Motor_Limitation/Saturation Dynamic'
 * '<S51>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/Motor_Limitation/Saturation Dynamic1'
 * '<S52>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/SVM/Park_Transform_Inverse'
 * '<S53>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/SVM/SVPWM'
 * '<S54>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/SVM/SVPWM/duty_gen'
 * '<S55>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/SVM/SVPWM/sector_select'
 * '<S56>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/SVM/SVPWM/duty_gen/sector1'
 * '<S57>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/SVM/SVPWM/duty_gen/sector2'
 * '<S58>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/SVM/SVPWM/duty_gen/sector3'
 * '<S59>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/SVM/SVPWM/duty_gen/sector4'
 * '<S60>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/SVM/SVPWM/duty_gen/sector5'
 * '<S61>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/SVM/SVPWM/duty_gen/sector6'
 * '<S62>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc/Do_Calc'
 * '<S63>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc/pid_schdule'
 * '<S64>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc/Do_Calc/idq_Assign'
 * '<S65>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc/Do_Calc/idq_Get'
 * '<S66>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc/Do_Calc/idq_Assign/FW_Calc'
 * '<S67>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc/Do_Calc/idq_Assign/MPTA_Calc'
 * '<S68>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc/Do_Calc/idq_Assign/iDC_Limiter'
 * '<S69>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc/Do_Calc/idq_Assign/FW_Calc/FW_I_Ctrl'
 * '<S70>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc/Do_Calc/idq_Assign/FW_Calc/FW_I_Ctrl/Intergrator_z'
 * '<S71>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc/Do_Calc/idq_Assign/FW_Calc/FW_I_Ctrl/Saturation Dynamic'
 * '<S72>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc/Do_Calc/idq_Assign/MPTA_Calc/MTPA_Calc'
 * '<S73>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc/Do_Calc/idq_Assign/MPTA_Calc/MTPA_Cali'
 * '<S74>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc/Do_Calc/idq_Assign/MPTA_Calc/MTPA_Cali/Sine_Cosine_Approximation'
 * '<S75>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc/Do_Calc/idq_Assign/iDC_Limiter/Low_Pass_Filter'
 * '<S76>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc/Do_Calc/idq_Assign/iDC_Limiter/Saturation Dynamic1'
 * '<S77>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc/Do_Calc/idq_Assign/iDC_Limiter/Saturation Dynamic3'
 * '<S78>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc/Do_Calc/idq_Assign/iDC_Limiter/sqrtSum'
 * '<S79>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc/Do_Calc/idq_Get/speed_mode'
 * '<S80>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc/Do_Calc/idq_Get/torque_mode'
 * '<S81>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc/Do_Calc/idq_Get/speed_mode/PI_Speed'
 * '<S82>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc/Do_Calc/idq_Get/speed_mode/PI_Speed/Rst_Integrator'
 * '<S83>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc/Do_Calc/idq_Get/speed_mode/PI_Speed/Saturation Dynamic1'
 * '<S84>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/idq_Calc/Do_Calc/idq_Get/torque_mode/Saturation Dynamic1'
 * '<S85>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/CurrentLoop'
 * '<S86>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/OpenLoop'
 * '<S87>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/idStep'
 * '<S88>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/iqStep'
 * '<S89>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/CurrentLoop/FeedForward'
 * '<S90>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/CurrentLoop/PI_backCalc_fixdt'
 * '<S91>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/CurrentLoop/PI_backCalc_fixdt1'
 * '<S92>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/CurrentLoop/PI_backCalc_fixdt/Rst_Integrator'
 * '<S93>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/CurrentLoop/PI_backCalc_fixdt/Saturation Dynamic1'
 * '<S94>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/CurrentLoop/PI_backCalc_fixdt1/Rst_Integrator'
 * '<S95>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/CurrentLoop/PI_backCalc_fixdt1/Saturation Dynamic1'
 * '<S96>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/idStep/Edge'
 * '<S97>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/idStep/Enabled Subsystem'
 * '<S98>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/idStep/Rate_Control'
 * '<S99>'  : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/idStep/Rate_Control/RateInit'
 * '<S100>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/idStep/Rate_Control/Saturation Dynamic'
 * '<S101>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/idStep/Rate_Control/StepAdd'
 * '<S102>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/idStep/Rate_Control/StepAdd/delayUnit'
 * '<S103>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/iqStep/Edge'
 * '<S104>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/iqStep/Enabled Subsystem'
 * '<S105>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/iqStep/Rate_Control'
 * '<S106>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/iqStep/Rate_Control/RateInit'
 * '<S107>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/iqStep/Rate_Control/Saturation Dynamic'
 * '<S108>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/iqStep/Rate_Control/StepAdd'
 * '<S109>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Core/vdq_Calc/iqStep/Rate_Control/StepAdd/delayUnit'
 * '<S110>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Ctrl_Mode_Transition/Control_Mode_Manager'
 * '<S111>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Target_Scale/open_mode'
 * '<S112>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Target_Scale/open_mode/vd_dege'
 * '<S113>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Target_Scale/open_mode/vd_rate_ctrl'
 * '<S114>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Target_Scale/open_mode/vq_edge'
 * '<S115>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Target_Scale/open_mode/vq_rate_ctrl'
 * '<S116>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Target_Scale/open_mode/vd_rate_ctrl/RateInit'
 * '<S117>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Target_Scale/open_mode/vd_rate_ctrl/Saturation Dynamic'
 * '<S118>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Target_Scale/open_mode/vd_rate_ctrl/StepAdd'
 * '<S119>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Target_Scale/open_mode/vd_rate_ctrl/StepAdd/delayUnit'
 * '<S120>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Target_Scale/open_mode/vq_rate_ctrl/RateInit'
 * '<S121>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Target_Scale/open_mode/vq_rate_ctrl/Saturation Dynamic'
 * '<S122>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Target_Scale/open_mode/vq_rate_ctrl/StepAdd'
 * '<S123>' : 'MotorController_FOC_hall/PMSM_Controller/PMSM_FOC/Target_Scale/open_mode/vq_rate_ctrl/StepAdd/delayUnit'
 */
#endif                                 /* RTW_HEADER_PMSM_Controller_h_ */

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