/******************************************************************************* * モジュール名称 :Application01 - CMD (every slot) * * コーリングシーケンス:void dpu_app01(int mode) * * 引数 :int mode 冗長機能ON/OFF (0:OFF/1:ON) * * 作成日・作成者 :2013/3/11 Y.K. * ********************************************************************************/ #include "dpu_api.h" #include "dpu_api_proto.h" #include "app_core.h" // *********************** // *** Prototype *** // *********************** // --- MW --- int app_cmmGetDpuNo(void); // --- app01_InitVar.c --- unsigned char app01_InitVar(); unsigned char app01_ErrClr (); // --- app01_cmdDmc.c --- void app01_CmdDMC(); void app01_CmdSpecial(); void dpu_app01(int i_mode) { int i_flag; unsigned int ui_load; // msec // ***************************** // *** DPU Status: INITIALIZE *** // ***************************** M_T_DPU_INFO t_dpuInfo; dpu_getDPUInfo (& t_dpuInfo ); Guc_dpuNo = t_dpuInfo.uc_dpuID-1; // 0:DPU1 1:DPU2 [app_cmmGetDpuNo()-1] Guc_dpuRdn = 0; #ifdef _APP_RDN_ Guc_dpuRdn = t_dpuInfo.uc_rdnMode; // 0:Norm 1:Redundant [i_mode] #endif Guc_WDTena = 0; // Software-WDT: DIS // ************ // *** INIT *** // ************ app_WhoWhere( 0, Gd_N_COM, 0 ); i_flag = app01_InitVar( ); // MD*U_INIT i_flag = app01_ErrClr ( ); // MD*U_ERR_CLR // ************ // *** MAIN *** // ************ for (;;) { // ******************* // *** WAIT 1 slot *** // ******************* app_WhoWhere( 0, Gd_N_COM, 0x01 ); dpu_waitProcessingSlot(1); // ************* // *** START *** // ************* app_WhoWhere( 0, Gd_N_COM, 0x02 ); app_START( 0, &ui_load ); // *************************** // *** COMMAND : from DMC *** // *************************** app_WhoWhere( 0, Gd_N_COM, 0x03 ); app01_CmdDMC(); // ************************** // *** COMMAND : Special *** // ************************** app_WhoWhere( 0, Gd_N_COM, 0x04 ); app01_CmdSpecial(); // ****************** // *** APP STATUS *** // ****************** app_WhoWhere( 0, Gd_N_COM, 0x0F ); app_END( 0, &ui_load ); } // ************ // *** EXIT *** // ************ dpu_WDTEna(0); // WDT: DIS dpu_appStop(); }