/*
 * File: RTC.h
 *
 * Code generated for Simulink model 'RTC'.
 *
 * Company                        : AIWAYS
 * Author                         : zhangzy
 * Model version                  : 'M100C100'
 * Simulink Coder version         : 8.13 (R2017b) 24-Jul-2017
 * C/C++ source code generated on : Fri Oct 23 15:09:38 2020
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: Infineon->TriCore
 * Code generation objectives:
 *    1. MISRA C:2012 guidelines
 *    2. Safety precaution
 * Validation result: Not run
 */

#ifndef RTW_HEADER_RTC_h_
#define RTW_HEADER_RTC_h_
#include <math.h>
#include <stddef.h>
#ifndef RTC_COMMON_INCLUDES_
# define RTC_COMMON_INCLUDES_
#include "rtwtypes.h"
#endif                                 /* RTC_COMMON_INCLUDES_ */

#include "RTC_types.h"

/* Includes for objects with custom storage classes. */
#include "RTC_Var.h"
#include "RTC_Cal.h"
#include "RTC_Const.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

/* Block signals for system '<S4>/Unit Delay External IC' */
typedef struct {
  uint32_T Init0;                       /* '<S16>/Init0' */
} B_UnitDelayExternalIC_RTC_T;

/* Block states (auto storage) for system '<S4>/Unit Delay External IC' */
typedef struct {
  uint32_T StateName;                  /* '<S16>/Unit Delay' */
  uint8_T StateName_h;                 /* '<S16>/Unit Delay1' */
} DW_UnitDelayExternalIC_RTC_T;

/* Block signals (auto storage) */
typedef struct {
  B_UnitDelayExternalIC_RTC_T UnitDelayExternalIC_l;/* '<S6>/Unit Delay External IC' */
  B_UnitDelayExternalIC_RTC_T UnitDelayExternalIC;/* '<S4>/Unit Delay External IC' */
} B_RTC_T;

/* Block states (auto storage) for system '<Root>' */
typedef struct {
  uint32_T StateName;                  /* '<S4>/Unit Delay21' */
  uint32_T StateName_d;                /* '<S6>/Unit Delay21' */
  uint32_T StateName_d1;               /* '<S12>/Unit Delay' */
  boolean_T StateName_i;               /* '<S4>/Unit Delay1' */
  boolean_T StateName_f;               /* '<S4>/Unit Delay2' */
  boolean_T UnitDelay_DSTATE;          /* '<S21>/Unit Delay' */
  DW_UnitDelayExternalIC_RTC_T UnitDelayExternalIC_l;/* '<S6>/Unit Delay External IC' */
  DW_UnitDelayExternalIC_RTC_T UnitDelayExternalIC;/* '<S4>/Unit Delay External IC' */
} DW_RTC_T;

/* Real-time Model Data Structure */
struct tag_RTM_RTC_T {
  const char_T * volatile errorStatus;
};

/* Block signals (auto storage) */
extern B_RTC_T RTC_B;

/* Block states (auto storage) */
extern DW_RTC_T RTC_DW;

/* Model entry point functions */
extern void RTC_initialize(void);

/* Exported entry point functions */
extern void RTC_RealTime_10ms(void);

/* Real-time Model object */
extern RT_MODEL_RTC_T *const RTC_M;

/*-
 * 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>' : 'RTC'
 * '<S1>'   : 'RTC/RTC'
 * '<S2>'   : 'RTC/RTC/RealTime_10ms'
 * '<S3>'   : 'RTC/RTC/RealTime_10ms/RealTime_10ms_sys'
 * '<S4>'   : 'RTC/RTC/RealTime_10ms/RealTime_10ms_sys/CalenderLife_Calculation'
 * '<S5>'   : 'RTC/RTC/RealTime_10ms/RealTime_10ms_sys/Odo_Calculation'
 * '<S6>'   : 'RTC/RTC/RealTime_10ms/RealTime_10ms_sys/PackUsageTi_Calculation'
 * '<S7>'   : 'RTC/RTC/RealTime_10ms/RealTime_10ms_sys/RTC_GbRTC_ExitRTCWakeup_flg'
 * '<S8>'   : 'RTC/RTC/RealTime_10ms/RealTime_10ms_sys/RTC_GbRTC_RtcCalErrFlt_flg'
 * '<S9>'   : 'RTC/RTC/RealTime_10ms/RealTime_10ms_sys/RTC_GbRTC_RtcInfoFlt_flg'
 * '<S10>'  : 'RTC/RTC/RealTime_10ms/RealTime_10ms_sys/RTC_GbRTC_ServTimeReach_flg'
 * '<S11>'  : 'RTC/RTC/RealTime_10ms/RealTime_10ms_sys/RTC_GcRTC_SleepWaitTi_min'
 * '<S12>'  : 'RTC/RTC/RealTime_10ms/RealTime_10ms_sys/ShelveTime_Calculation'
 * '<S13>'  : 'RTC/RTC/RealTime_10ms/RealTime_10ms_sys/SleepTime_Calculation'
 * '<S14>'  : 'RTC/RTC/RealTime_10ms/RealTime_10ms_sys/CalenderLife_Calculation/Limiter'
 * '<S15>'  : 'RTC/RTC/RealTime_10ms/RealTime_10ms_sys/CalenderLife_Calculation/RTC_GcRTC_CalenderLife_Day'
 * '<S16>'  : 'RTC/RTC/RealTime_10ms/RealTime_10ms_sys/CalenderLife_Calculation/Unit Delay External IC'
 * '<S17>'  : 'RTC/RTC/RealTime_10ms/RealTime_10ms_sys/Odo_Calculation/RTC_GcRTC_SumOdo_km'
 * '<S18>'  : 'RTC/RTC/RealTime_10ms/RealTime_10ms_sys/PackUsageTi_Calculation/Limiter'
 * '<S19>'  : 'RTC/RTC/RealTime_10ms/RealTime_10ms_sys/PackUsageTi_Calculation/RTC_GcRTC_PackUsageTi_Day'
 * '<S20>'  : 'RTC/RTC/RealTime_10ms/RealTime_10ms_sys/PackUsageTi_Calculation/Unit Delay External IC'
 * '<S21>'  : 'RTC/RTC/RealTime_10ms/RealTime_10ms_sys/ShelveTime_Calculation/EdgeFalling'
 * '<S22>'  : 'RTC/RTC/RealTime_10ms/RealTime_10ms_sys/ShelveTime_Calculation/Limiter'
 * '<S23>'  : 'RTC/RTC/RealTime_10ms/RealTime_10ms_sys/ShelveTime_Calculation/RTC_GcRTC_ShelveTime_min'
 * '<S24>'  : 'RTC/RTC/RealTime_10ms/RealTime_10ms_sys/SleepTime_Calculation/RTC_GcRTC_SleepTime_min'
 */

/*-
 * Requirements for '<Root>': RTC
 */
#endif                                 /* RTW_HEADER_RTC_h_ */

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