RW); /* UNS8 checkAccess */
}
-static init_step = 0;
+static int init_step = 0;
/*Froward declaration*/
static void ConfigureSlaveNode(CO_Data* d, UNS8 nodeId);
}
#endif
-void help()
+void help(void)
{
printf("**************************************************************\n");
printf("* TestMasterMicroMod *\n");
}
}
+/*************************** EXIT *****************************************/
+void Exit(CO_Data* d, UNS32 id)
+{
+ masterSendNMTstateChange(&TestMaster_Data, 0x02, NMT_Reset_Node);
+
+ //Stop master
+ setState(&TestMaster_Data, Stopped);
+}
+
/****************************************************************************/
/*************************** MAIN *****************************************/
/****************************************************************************/
/* install signal handler for manual break */
signal(SIGTERM, catch_signal);
signal(SIGINT, catch_signal);
+ TimerInit();
#endif
#ifndef NOT_USE_DYNAMIC_LOADING
setState(&TestMaster_Data, Stopped);
// Stop timer thread
- StopTimerLoop();
+ StopTimerLoop(&Exit);
fail_master:
if(MasterBoard.baudrate) canClose(&TestMaster_Data);
- return 0;
+ TimerCleanup();
+ return 0;
}