/*
 * File: CFM.c
 *
 * Code generated for Simulink model 'CFM'.
 *
 * Company                        : AIWAYS
 * Author                         : zhangzy
 * Model version                  : 'M111C110'
 * Simulink Coder version         : 8.13 (R2017b) 24-Jul-2017
 * C/C++ source code generated on : Wed Jul 14 16:29:42 2021
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: Infineon->TriCore
 * Code generation objectives:
 *    1. MISRA C:2012 guidelines
 *    2. Safety precaution
 * Validation result: Not run
 */

#include "CFM.h"
#include "CFM_private.h"

/* Block signals (auto storage) */
B_CFM_T CFM_B;

/* Block states (auto storage) */
DW_CFM_T CFM_DW;

/* External outputs (root outports fed by signals with auto storage) */
ExtY_CFM_T CFM_Y;

/*
 * System initialize for atomic system:
 *    '<S4>/BMSDelay'
 *    '<S5>/BMSDelay'
 *    '<S15>/BMSDelay'
 *    '<S16>/BMSDelay'
 *    '<S17>/BMSDelay'
 *    '<S18>/BMSDelay'
 *    '<S20>/BMSDelay'
 *    '<S7>/BMSDelay'
 *    '<S8>/BMSDelay'
 */
void CFM_BMSDelay_Init(DW_BMSDelay_CFM_T *localDW)
{
  localDW->FixPtUnitDelay2_DSTATE = 1U;
}

/*
 * Output and update for atomic system:
 *    '<S4>/BMSDelay'
 *    '<S5>/BMSDelay'
 *    '<S15>/BMSDelay'
 *    '<S16>/BMSDelay'
 *    '<S17>/BMSDelay'
 *    '<S18>/BMSDelay'
 *    '<S20>/BMSDelay'
 *    '<S7>/BMSDelay'
 *    '<S8>/BMSDelay'
 */
void CFM_BMSDelay(const boolean_T rtu_Enable[8], uint8_T rtu_Step, uint16_T
                  rtu_TimeThrld, B_BMSDelay_CFM_T *localB, DW_BMSDelay_CFM_T
                  *localDW)
{
  int32_T i;
  boolean_T rtb_LogicalOperator;
  uint16_T rtb_Init;
  uint8_T tmp;
  for (i = 0; i < 8; i++) {
    rtb_LogicalOperator = !rtu_Enable[i];
    if (rtb_LogicalOperator || (localDW->FixPtUnitDelay2_DSTATE != 0)) {
      rtb_Init = 0U;
    } else {
      rtb_Init = localDW->FixPtUnitDelay1_DSTATE[i];
    }

    localB->RelationalOperator[i] = (rtb_Init >= rtu_TimeThrld);
    if (rtb_LogicalOperator) {
      localDW->FixPtUnitDelay1_DSTATE[i] = 0U;
    } else {
      if (localB->RelationalOperator[i]) {
        tmp = 0U;
      } else {
        tmp = rtu_Step;
      }

      localDW->FixPtUnitDelay1_DSTATE[i] = (uint16_T)((uint32_T)tmp + rtb_Init);
    }
  }

  localDW->FixPtUnitDelay2_DSTATE = 0U;
}

/* Model step function */
void CFM_CMCFltMag_20ms(void)
{
  int8_T s19_iter;
  boolean_T rtb_Logical[8];
  int8_T s38_iter;
  int32_T i;
  uint32_T tmp;
  int32_T LaCFM_AFEAdcRelatedErr_flg_tmp;
  for (i = 0; i < 8; i++) {
    LaCFM_AFEComLost_flg[i] = (GaISP_AFEComLost_numb[i] != CFM_CONST0_NUMB);
  }

  CFM_BMSDelay(((boolean_T *)&(LaCFM_AFEComLost_flg[0])), CFM_RUNTIME20_MS,
               CcCFM_AFEComLostDeb_ms, &CFM_B.BMSDelay, &CFM_DW.BMSDelay);
  for (i = 0; i < 8; i++) {
    if (CbCFM_AFEComLostOvrSwt_flg) {
      GaCFM_AFEComLost_flg[i] = CaCFM_AFEComLostOvr_flg;
    } else {
      GaCFM_AFEComLost_flg[i] = CFM_B.BMSDelay.RelationalOperator[i];
    }
  }

  LaCFM_InitAFEErr_flg[0] = ((boolean_T)ASWTYPE_FALSE);
  LaCFM_InitAFEErr_flg[1] = ((boolean_T)ASWTYPE_FALSE);
  LaCFM_InitAFEErr_flg[2] = ((boolean_T)ASWTYPE_FALSE);
  LaCFM_InitAFEErr_flg[3] = ((boolean_T)ASWTYPE_FALSE);
  LaCFM_InitAFEErr_flg[4] = ((boolean_T)ASWTYPE_FALSE);
  LaCFM_InitAFEErr_flg[5] = ((boolean_T)ASWTYPE_FALSE);
  LaCFM_InitAFEErr_flg[6] = ((boolean_T)ASWTYPE_FALSE);
  LaCFM_InitAFEErr_flg[7] = ((boolean_T)ASWTYPE_FALSE);
  for (s19_iter = 1; s19_iter <= (int8_T)CFM_CONST8_NUMB; s19_iter++) {
    LcCFM_AFEIndex_numb = (uint8_T)s19_iter;
    if (CFM_DW.MinCellTempNumbIterator_Itera_b != 0) {
      CFM_DW.StateName_h = ((boolean_T)ASWTYPE_FALSE);
    }

    CFM_DW.MinCellTempNumbIterator_Itera_b = 1U;
    for (s38_iter = 1; s38_iter <= (int8_T)CFM_CONST14_NUMB; s38_iter++) {
      i = LcCFM_AFEIndex_numb - CFM_CONST1_NUMB;
      if (i < 0) {
        i = 0;
      }

      i = (int32_T)((uint32_T)i * CFM_CONST14_NUMB);
      if ((uint32_T)i > 255U) {
        i = 255;
      }

      tmp = (uint32_T)i + (uint16_T)s38_iter;
      if (tmp > 255U) {
        tmp = 255U;
      }

      LcCFM_VoltSampleIndex2_numb = (uint8_T)tmp;
      LaCFM_AFEAdcRelatedErr_flg_tmp = LcCFM_VoltSampleIndex2_numb - 1;
      LbCFM_AdcRelatedErr_flg =
        (GaISP_AFEAdcRelatedErr_numb[LaCFM_AFEAdcRelatedErr_flg_tmp] !=
         CFM_CONST0_NUMB);
      LbCFM_CellVoltUse2_flg =
        (CaCFM_BusBarCell_enum[LaCFM_AFEAdcRelatedErr_flg_tmp] == (int32_T)
         Enum_CFMBusBarCell_Cell);
      LbCFM_AFEAdcRelatedErr_flg = ((LbCFM_AdcRelatedErr_flg &&
        LbCFM_CellVoltUse2_flg) || CFM_DW.StateName_h);
      CFM_DW.StateName_h = LbCFM_AFEAdcRelatedErr_flg;
    }

    if (s19_iter == 1) {
      for (i = 0; i < 8; i++) {
        LaCFM_AFEAdcRelatedErr_flg[i] = LaCFM_InitAFEErr_flg[i];
      }
    }

    LaCFM_AFEAdcRelatedErr_flg_tmp = LcCFM_AFEIndex_numb - 1;
    LaCFM_AFEAdcRelatedErr_flg[LaCFM_AFEAdcRelatedErr_flg_tmp] =
      LbCFM_AFEAdcRelatedErr_flg;
    if (CFM_DW.MinCellTempNumbIterator_Itera_j != 0) {
      CFM_DW.StateName_l = ((boolean_T)ASWTYPE_FALSE);
    }

    CFM_DW.MinCellTempNumbIterator_Itera_j = 1U;
    for (s38_iter = 1; s38_iter <= (int8_T)CFM_CONST6_NUMB; s38_iter++) {
      i = LcCFM_AFEIndex_numb - CFM_CONST1_NUMB;
      if (i < 0) {
        i = 0;
      }

      i = (int32_T)((uint32_T)i * CFM_CONST6_NUMB);
      if ((uint32_T)i > 255U) {
        i = 255;
      }

      tmp = (uint32_T)i + (uint16_T)s38_iter;
      if (tmp > 255U) {
        tmp = 255U;
      }

      LcCFM_TempSampleIndex_numb = (uint8_T)tmp;
      i = LcCFM_TempSampleIndex_numb - 1;
      LbCFM_TempUpdErr_flg = (GaISP_AFECellTempUpdErr_numb[i] != CFM_CONST0_NUMB);
      LbCFM_CellTempUse_flg = (CaCFM_NTCTemp_enum[i] != (int32_T)
        Enum_CFMNTCTemp_NoUse);
      LbCFM_AFETempUpdErr_flg = ((LbCFM_TempUpdErr_flg && LbCFM_CellTempUse_flg)
        || CFM_DW.StateName_l);
      CFM_DW.StateName_l = LbCFM_AFETempUpdErr_flg;
    }

    if (s19_iter == 1) {
      for (i = 0; i < 8; i++) {
        LaCFM_AFECellTempUpdErr_flg[i] = LaCFM_InitAFEErr_flg[i];
      }
    }

    LaCFM_AFECellTempUpdErr_flg[LaCFM_AFEAdcRelatedErr_flg_tmp] =
      LbCFM_AFETempUpdErr_flg;
    if (CFM_DW.MinCellTempNumbIterator_Itera_k != 0) {
      CFM_DW.StateName_o = ((boolean_T)ASWTYPE_FALSE);
    }

    CFM_DW.MinCellTempNumbIterator_Itera_k = 1U;
    for (s38_iter = 1; s38_iter <= (int8_T)CFM_CONST14_NUMB; s38_iter++) {
      i = LcCFM_AFEIndex_numb - CFM_CONST1_NUMB;
      if (i < 0) {
        i = 0;
      }

      i = (int32_T)((uint32_T)i * CFM_CONST14_NUMB);
      if ((uint32_T)i > 255U) {
        i = 255;
      }

      tmp = (uint32_T)i + (uint16_T)s38_iter;
      if (tmp > 255U) {
        tmp = 255U;
      }

      LcCFM_VoltSampleIndex1_numb = (uint8_T)tmp;
      i = LcCFM_VoltSampleIndex1_numb - 1;
      LbCFM_CellVoltLineOpenErr_flg = (GaISP_AFECellVoltLineOpen_numb[i] !=
        CFM_CONST0_NUMB);
      LbCFM_CellVoltUse1_flg = (CaCFM_BusBarCell_enum[i] == (int32_T)
        Enum_CFMBusBarCell_Cell);
      LbCFM_AFECellVoltLineOpenErr_flg = ((LbCFM_CellVoltLineOpenErr_flg &&
        LbCFM_CellVoltUse1_flg) || CFM_DW.StateName_o);
      CFM_DW.StateName_o = LbCFM_AFECellVoltLineOpenErr_flg;
    }

    if (s19_iter == 1) {
      for (i = 0; i < 8; i++) {
        LaCFM_AFECellVoltLineOpen_flg[i] = LaCFM_InitAFEErr_flg[i];
      }
    }

    LaCFM_AFECellVoltLineOpen_flg[LaCFM_AFEAdcRelatedErr_flg_tmp] =
      LbCFM_AFECellVoltLineOpenErr_flg;
    if (CFM_DW.MinCellTempNumbIterator_Itera_i != 0) {
      CFM_DW.StateName_c = ((boolean_T)ASWTYPE_FALSE);
    }

    CFM_DW.MinCellTempNumbIterator_Itera_i = 1U;
    for (s38_iter = 1; s38_iter <= (int8_T)CFM_CONST14_NUMB; s38_iter++) {
      i = LcCFM_AFEIndex_numb - CFM_CONST1_NUMB;
      if (i < 0) {
        i = 0;
      }

      i = (int32_T)((uint32_T)i * CFM_CONST14_NUMB);
      if ((uint32_T)i > 255U) {
        i = 255;
      }

      tmp = (uint32_T)i + (uint16_T)s38_iter;
      if (tmp > 255U) {
        tmp = 255U;
      }

      LcCFM_VoltSampleIndex_numb = (uint8_T)tmp;
      i = LcCFM_VoltSampleIndex_numb - 1;
      LbCFM_CellVoltUpdErr_flg = (GaISP_AFECellVoltUpdErr_numb[i] !=
        CFM_CONST0_NUMB);
      LbCFM_CellVoltUse_flg = (CaCFM_BusBarCell_enum[i] == (int32_T)
        Enum_CFMBusBarCell_Cell);
      LbCFM_AFECellVoltUpdErr_flg = ((LbCFM_CellVoltUpdErr_flg &&
        LbCFM_CellVoltUse_flg) || CFM_DW.StateName_c);
      CFM_DW.StateName_c = LbCFM_AFECellVoltUpdErr_flg;
    }

    if (s19_iter == 1) {
      for (i = 0; i < 8; i++) {
        LaCFM_AFECellVoltUpdErr_flg[i] = LaCFM_InitAFEErr_flg[i];
      }
    }

    LaCFM_AFECellVoltUpdErr_flg[LaCFM_AFEAdcRelatedErr_flg_tmp] =
      LbCFM_AFECellVoltUpdErr_flg;
    if (CFM_DW.MinCellTempNumbIterator_Iterati != 0) {
      CFM_DW.StateName = ((boolean_T)ASWTYPE_FALSE);
    }

    CFM_DW.MinCellTempNumbIterator_Iterati = 1U;
    for (s38_iter = 1; s38_iter <= (int8_T)CFM_CONST6_NUMB; s38_iter++) {
      i = LcCFM_AFEIndex_numb - CFM_CONST1_NUMB;
      if (i < 0) {
        i = 0;
      }

      i = (int32_T)((uint32_T)i * CFM_CONST6_NUMB);
      if ((uint32_T)i > 255U) {
        i = 255;
      }

      tmp = (uint32_T)i + (uint16_T)s38_iter;
      if (tmp > 255U) {
        tmp = 255U;
      }

      LcCFM_TempSampleIndex1_numb = (uint8_T)tmp;
      i = LcCFM_TempSampleIndex1_numb - 1;
      LbCFM_GpioLineOpen_flg = (GaISP_AFEGpioLineOpen_numb[i] != CFM_CONST0_NUMB);
      LbCFM_CellTempUse1_flg = (CaCFM_NTCTemp_enum[i] != (int32_T)
        Enum_CFMNTCTemp_NoUse);
      LbCFM_AFEGpioLineOpen_flg = ((LbCFM_GpioLineOpen_flg &&
        LbCFM_CellTempUse1_flg) || CFM_DW.StateName);
      CFM_DW.StateName = LbCFM_AFEGpioLineOpen_flg;
    }

    if (s19_iter == 1) {
      for (i = 0; i < 8; i++) {
        LaCFM_AFEGpioLineOpen_flg[i] = LaCFM_InitAFEErr_flg[i];
      }
    }

    LaCFM_AFEGpioLineOpen_flg[LaCFM_AFEAdcRelatedErr_flg_tmp] =
      LbCFM_AFEGpioLineOpen_flg;
  }

  for (i = 0; i < 8; i++) {
    LaCFM_AFEDiagModeExitErr_flg[i] = ((GaISP_AFEDiagModeExitErr_numb[i] !=
      CFM_CONST0_NUMB) && (GaISP_AFEComLost_numb[i] == CFM_CONST0_NUMB) &&
      (LaCFM_AFECellVoltUpdErr_flg[i] == ((boolean_T)ASWTYPE_FALSE)));
  }

  CFM_BMSDelay(((boolean_T *)&(LaCFM_AFEDiagModeExitErr_flg[0])),
               CFM_RUNTIME20_MS, CcCFM_AFEDiagModeExitErrDeb_ms,
               &CFM_B.BMSDelay_a, &CFM_DW.BMSDelay_a);
  for (i = 0; i < 8; i++) {
    if (CbCFM_AFEDiagModeExitErrOvrSwt_flg) {
      GaCFM_AFEDiagModeExitErr_flg[i] = CaCFM_AFEDiagModeExitErrOvr_flg[i];
    } else {
      GaCFM_AFEDiagModeExitErr_flg[i] = CFM_B.BMSDelay_a.RelationalOperator[i];
    }

    rtb_Logical[i] = (LaCFM_AFEAdcRelatedErr_flg[i] && (GaISP_AFEComLost_numb[i]
      == CFM_CONST0_NUMB) && (LaCFM_AFECellVoltUpdErr_flg[i] == ((boolean_T)
      ASWTYPE_FALSE)));
  }

  CFM_BMSDelay(rtb_Logical, CFM_RUNTIME20_MS, CcCFM_AFEAdcRelatedErrDeb_ms,
               &CFM_B.BMSDelay_d, &CFM_DW.BMSDelay_d);
  for (i = 0; i < 8; i++) {
    if (CbCFM_AFEAdcRelatedErrOvrSwt_flg) {
      GaCFM_AFEAdcRelatedErr_flg[i] = CaCFM_AFEAdcRelatedErrOvr_flg[i];
    } else {
      GaCFM_AFEAdcRelatedErr_flg[i] = CFM_B.BMSDelay_d.RelationalOperator[i];
    }

    rtb_Logical[i] = (LaCFM_AFECellTempUpdErr_flg[i] && (GaISP_AFEComLost_numb[i]
      == CFM_CONST0_NUMB));
  }

  CFM_BMSDelay(rtb_Logical, CFM_RUNTIME20_MS, CcCFM_AFECellTempUpdErrDeb_ms,
               &CFM_B.BMSDelay_n, &CFM_DW.BMSDelay_n);
  for (i = 0; i < 8; i++) {
    if (CbCFM_AFECellTempUpdErrOvrSwt_flg) {
      GaCFM_AFECellTempUpdErr_flg[i] = CaCFM_AFECellTempUpdErrOvr_flg[i];
    } else {
      GaCFM_AFECellTempUpdErr_flg[i] = CFM_B.BMSDelay_n.RelationalOperator[i];
    }

    rtb_Logical[i] = (LaCFM_AFECellVoltLineOpen_flg[i] &&
                      (GaISP_AFEComLost_numb[i] == CFM_CONST0_NUMB) &&
                      (LaCFM_AFECellVoltUpdErr_flg[i] == ((boolean_T)
      ASWTYPE_FALSE)));
  }

  CFM_BMSDelay(rtb_Logical, CFM_RUNTIME20_MS, CcCFM_AFECellVoltLineOpenDeb_ms,
               &CFM_B.BMSDelay_c, &CFM_DW.BMSDelay_c);
  for (i = 0; i < 8; i++) {
    if (CbCFM_AFECellVoltLineOpenOvrSwt_flg) {
      GaCFM_AFECellVoltLineOpen_flg[i] = CaCFM_AFECellVoltLineOpenOvr_flg[i];
    } else {
      GaCFM_AFECellVoltLineOpen_flg[i] = CFM_B.BMSDelay_c.RelationalOperator[i];
    }

    rtb_Logical[i] = (LaCFM_AFECellVoltUpdErr_flg[i] && (GaISP_AFEComLost_numb[i]
      == CFM_CONST0_NUMB));
  }

  CFM_BMSDelay(rtb_Logical, CFM_RUNTIME20_MS, CcCFM_AFECellVoltUpdErrDeb_ms,
               &CFM_B.BMSDelay_b, &CFM_DW.BMSDelay_b);
  for (i = 0; i < 8; i++) {
    if (CbCFM_AFECellVoltUpdErrOvrSwt_flg) {
      GaCFM_AFECellVoltUpdErr_flg[i] = CaCFM_AFECellVoltUpdErrOvr_flg[i];
    } else {
      GaCFM_AFECellVoltUpdErr_flg[i] = CFM_B.BMSDelay_b.RelationalOperator[i];
    }

    rtb_Logical[i] = ((LaCFM_AFEGpioLineOpen_flg[i] ||
                       GaCDP_AFETempSampAbn_flg[i]) && (GaISP_AFEComLost_numb[i]
      == CFM_CONST0_NUMB) && (LaCFM_AFECellVoltUpdErr_flg[i] == ((boolean_T)
      ASWTYPE_FALSE)));
  }

  CFM_BMSDelay(rtb_Logical, CFM_RUNTIME20_MS, CcCFM_AFEGpioLineOpenDeb_ms,
               &CFM_B.BMSDelay_f, &CFM_DW.BMSDelay_f);
  for (i = 0; i < 8; i++) {
    if (CbCFM_AFEGpioLineOpenOvrSwt_flg) {
      GaCFM_AFEGpioLineOpen_flg[i] = CaCFM_AFEGpioLineOpenOvr_flg[i];
    } else {
      GaCFM_AFEGpioLineOpen_flg[i] = CFM_B.BMSDelay_f.RelationalOperator[i];
    }

    LaCFM_AFEOtherErr_flg[i] = ((GaISP_AFEOtherErr_numb[i] != CFM_CONST0_NUMB) &&
      (GaISP_AFEComLost_numb[i] == CFM_CONST0_NUMB) &&
      (LaCFM_AFECellVoltUpdErr_flg[i] == ((boolean_T)ASWTYPE_FALSE)));
  }

  CFM_BMSDelay(((boolean_T *)&(LaCFM_AFEOtherErr_flg[0])), CFM_RUNTIME20_MS,
               CcCFM_AFEOtherErrDeb_ms, &CFM_B.BMSDelay_h, &CFM_DW.BMSDelay_h);
  for (i = 0; i < 8; i++) {
    if (CbCFM_AFEOtherErrOvrSwt_flg) {
      GaCFM_AFEOtherErr_flg[i] = CaCFM_AFEOtherErrOvr_flg[i];
    } else {
      GaCFM_AFEOtherErr_flg[i] = CFM_B.BMSDelay_h.RelationalOperator[i];
    }

    LaCFM_AFESampleErr_flg[i] = ((GaISP_AFESampleErr_numb[i] != CFM_CONST0_NUMB)
      && (GaISP_AFEComLost_numb[i] == CFM_CONST0_NUMB) &&
      (LaCFM_AFECellVoltUpdErr_flg[i] == ((boolean_T)ASWTYPE_FALSE)));
  }

  CFM_BMSDelay(((boolean_T *)&(LaCFM_AFESampleErr_flg[0])), CFM_RUNTIME20_MS,
               CcCFM_AFESampleErrDeb_ms, &CFM_B.BMSDelay_cq, &CFM_DW.BMSDelay_cq);
  for (i = 0; i < 8; i++) {
    if (CbCFM_AFESampleErrOvrSwt_flg) {
      GaCFM_AFESampleErr_flg[i] = CaCFM_AFESampleErrOvr_flg[i];
    } else {
      GaCFM_AFESampleErr_flg[i] = CFM_B.BMSDelay_cq.RelationalOperator[i];
    }

    CFM_Y.GaCFM_AFEComLost_flg_l[i] = GaCFM_AFEComLost_flg[i];
    CFM_Y.GaCFM_AFECellVoltUpdErr_flg_e[i] = GaCFM_AFECellVoltUpdErr_flg[i];
    CFM_Y.GaCFM_AFECellTempUpdErr_flg_k[i] = GaCFM_AFECellTempUpdErr_flg[i];
    CFM_Y.GaCFM_AFECellVoltLineOpen_flg_h[i] = GaCFM_AFECellVoltLineOpen_flg[i];
    CFM_Y.GaCFM_AFEGpioLineOpen_flg_k[i] = GaCFM_AFEGpioLineOpen_flg[i];
    CFM_Y.GaCFM_AFEAdcRelatedErr_flg_j[i] = GaCFM_AFEAdcRelatedErr_flg[i];
    CFM_Y.GaCFM_AFEDiagModeExitErr_flg_d[i] = GaCFM_AFEDiagModeExitErr_flg[i];
    CFM_Y.GaCFM_AFEOtherErr_flg_e[i] = GaCFM_AFEOtherErr_flg[i];
    CFM_Y.GaCFM_AFESampleErr_flg_c[i] = GaCFM_AFESampleErr_flg[i];
  }
}

/* Model initialize function */
void CFM_initialize(void)
{
  CFM_BMSDelay_Init(&CFM_DW.BMSDelay);
  CFM_DW.StateName_h = ((boolean_T)ASWTYPE_FALSE);
  CFM_DW.StateName_l = ((boolean_T)ASWTYPE_FALSE);
  CFM_DW.StateName_o = ((boolean_T)ASWTYPE_FALSE);
  CFM_DW.StateName_c = ((boolean_T)ASWTYPE_FALSE);
  CFM_DW.StateName = ((boolean_T)ASWTYPE_FALSE);
  CFM_BMSDelay_Init(&CFM_DW.BMSDelay_a);
  CFM_BMSDelay_Init(&CFM_DW.BMSDelay_d);
  CFM_BMSDelay_Init(&CFM_DW.BMSDelay_n);
  CFM_BMSDelay_Init(&CFM_DW.BMSDelay_c);
  CFM_BMSDelay_Init(&CFM_DW.BMSDelay_b);
  CFM_BMSDelay_Init(&CFM_DW.BMSDelay_f);
  CFM_BMSDelay_Init(&CFM_DW.BMSDelay_h);
  CFM_BMSDelay_Init(&CFM_DW.BMSDelay_cq);
}

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