/*
 * File: BMCR_ModMag.h
 *
 * Code generated for Simulink model 'BMCR_ModMag'.
 *
 * Model version                  : 'M1.5.5'
 * Simulink Coder version         : 8.13 (R2017b) 24-Jul-2017
 * C/C++ source code generated on : Thu Aug 12 10:50:12 2021
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: Infineon->TriCore
 * Code generation objectives:
 *    1. MISRA C:2012 guidelines
 *    2. Execution efficiency
 * Validation result: Not run
 */

#ifndef RTW_HEADER_BMCR_ModMag_h_
#define RTW_HEADER_BMCR_ModMag_h_
#ifndef BMCR_ModMag_COMMON_INCLUDES_
# define BMCR_ModMag_COMMON_INCLUDES_
#include "rtwtypes.h"
#endif                                 /* BMCR_ModMag_COMMON_INCLUDES_ */

#include "BMCR_ModMag_types.h"

/* Includes for objects with custom storage classes. */
#include "BMCRparameter.h"

/* Macros for accessing real-time model data structure */

/* user code (top of header file) */
#include "ASW_Interface.h"

/* Block signals (auto storage) */
typedef struct {
  uint8_T BMCR_stBmsModeCtrl_n;        /* '<S2>/BMCR' */
  uint8_T BMCR_bBmuShutdown_e;         /* '<S2>/BMCR' */
  boolean_T BMCR_bPwrUpReq_m;          /* '<S2>/BMCR' */
  boolean_T BMCR_bPwrDwnReq_p;         /* '<S2>/BMCR' */
  boolean_T BMCR_bDChrgPwrUpReq_c;     /* '<S2>/BMCR' */
  boolean_T BMCR_bDChrgPwrDwnReq_i;    /* '<S2>/BMCR' */
  boolean_T BMCR_flgPwrDownReq_n;      /* '<S2>/BMCR' */
  boolean_T BMCR_flgPwrUpReq_k;        /* '<S2>/BMCR' */
  boolean_T BMCR_bPwrDownReqVald_n;    /* '<S2>/BMCR' */
  boolean_T BMCR_bPwrUpReqVald_f;      /* '<S2>/BMCR' */
  boolean_T BMCR_bWkUpVCU_l;           /* '<S2>/BMCR' */
  boolean_T BMCR_flgBmsSlp_h;          /* '<S2>/BMCR' */
  boolean_T BMCR_bAutoAdrsEna_d;       /* '<S2>/BMCR' */
} B_BMCR_ModMag_T;

/* Block states (auto storage) for system '<Root>' */
typedef struct {
  real32_T DcChrgCnt;                    /* '<S2>/BMCR' */
  real32_T Delay_DSTATE;               /* '<S17>/Delay' */
  uint32_T temporalCounter_i1;         /* '<S2>/BMCR' */
  uint16_T BMCR_cntDcMRDwn;            /* '<S2>/BMCR' */
  uint16_T i_BMM;                      /* '<S2>/BMCR' */
  uint8_T is_active_c3_BMCR_ModMag;    /* '<S2>/BMCR' */
  uint8_T is_c3_BMCR_ModMag;           /* '<S2>/BMCR' */
  uint8_T is_Operation;                /* '<S2>/BMCR' */
  uint8_T is_Fault_Mode;               /* '<S2>/BMCR' */
  uint8_T is_Standby;                  /* '<S2>/BMCR' */
  uint8_T is_HV_ON;                    /* '<S2>/BMCR' */
  boolean_T BMCR_flgEolOut;            /* '<S2>/BMCR' */
} DW_BMCR_ModMag_T;

/* External inputs (root inport signals with auto storage) */
typedef struct {
  real32_T COMR_stVcuAllwSlp;          /* '<Root>/COMR_stVcuAllwSlp' */
} ExtU_BMCR_ModMag_T;

/* Block signals (auto storage) */
extern B_BMCR_ModMag_T BMCR_ModMag_B;

/* Block states (auto storage) */
extern DW_BMCR_ModMag_T BMCR_ModMag_DW;

/* External inputs (root inport signals with auto storage) */
extern ExtU_BMCR_ModMag_T BMCR_ModMag_U;

/*
 * Exported Global Signals
 *
 * Note: Exported global signals are block signals with an exported global
 * storage class designation.  Code generation will declare the memory for
 * these signals and export their symbols.
 *
 */
extern boolean_T BMCR_stWakSrc;        /* '<S3>/Logical Operator' */

/* Model entry point functions */
extern void BMCR_ModMag_initialize(void);
extern void BMCR_ModMag_step(void);

/* Exported data declaration */
#define ASW1_OEM_START_SEC_DEFAULT_RAM1_CLEARED_UNSPECIFIED
#include "Asw1_OEM_MemMap.h"

/* Declaration for custom storage class: OutputSignal */
extern volatile boolean_T BMCR_ICWakeUp;
extern volatile boolean_T BMCR_RTCWakeup;
extern volatile boolean_T BMCR_TPLWakeup;
extern volatile boolean_T BMCR_bAutoAdrsEna;
extern volatile uint8_T BMCR_bBmuShutdown;
extern volatile boolean_T BMCR_bDChrgPwrDwnReq;
extern volatile boolean_T BMCR_bDChrgPwrUpReq;
extern volatile boolean_T BMCR_bPwrDownReqVald;
extern volatile boolean_T BMCR_bPwrDwnReq;
extern volatile boolean_T BMCR_bPwrUpReq;
extern volatile boolean_T BMCR_bPwrUpReqVald;
extern volatile boolean_T BMCR_bWkUpVCU;
extern volatile boolean_T BMCR_flgBmsOTAMode;
extern volatile boolean_T BMCR_flgBmsSlp;
extern volatile boolean_T BMCR_flgPwrDownReq;
extern volatile boolean_T BMCR_flgPwrUpReq;
extern volatile uint8_T BMCR_stBmsModeCtrl;
extern volatile boolean_T BMCR_stNMRelease;

#define ASW1_OEM_STOP_SEC_DEFAULT_RAM1_CLEARED_UNSPECIFIED
#include "Asw1_OEM_MemMap.h"

/*-
 * 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>' : 'BMCR_ModMag'
 * '<S1>'   : 'BMCR_ModMag/BMCR_ModMag'
 * '<S2>'   : 'BMCR_ModMag/BMCR_ModMag/BMCR'
 * '<S3>'   : 'BMCR_ModMag/BMCR_ModMag/WakDetect'
 * '<S4>'   : 'BMCR_ModMag/BMCR_ModMag/BMCR/BMCR'
 * '<S5>'   : 'BMCR_ModMag/BMCR_ModMag/WakDetect/Compare To Constant1'
 * '<S6>'   : 'BMCR_ModMag/BMCR_ModMag/WakDetect/Compare To Constant10'
 * '<S7>'   : 'BMCR_ModMag/BMCR_ModMag/WakDetect/Compare To Constant2'
 * '<S8>'   : 'BMCR_ModMag/BMCR_ModMag/WakDetect/Compare To Constant3'
 * '<S9>'   : 'BMCR_ModMag/BMCR_ModMag/WakDetect/Compare To Constant4'
 * '<S10>'  : 'BMCR_ModMag/BMCR_ModMag/WakDetect/Compare To Constant5'
 * '<S11>'  : 'BMCR_ModMag/BMCR_ModMag/WakDetect/Compare To Constant6'
 * '<S12>'  : 'BMCR_ModMag/BMCR_ModMag/WakDetect/Compare To Constant7'
 * '<S13>'  : 'BMCR_ModMag/BMCR_ModMag/WakDetect/Compare To Constant8'
 * '<S14>'  : 'BMCR_ModMag/BMCR_ModMag/WakDetect/Compare To Constant9'
 * '<S15>'  : 'BMCR_ModMag/BMCR_ModMag/WakDetect/Compare To Zero1'
 * '<S16>'  : 'BMCR_ModMag/BMCR_ModMag/WakDetect/Compare To Zero2'
 * '<S17>'  : 'BMCR_ModMag/BMCR_ModMag/WakDetect/TONV_10msTimeDebounce'
 */
#endif                                 /* RTW_HEADER_BMCR_ModMag_h_ */

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