Added a timeout for Sdo configurations.
authorFlorian Pose <fp@igh-essen.com>
Mon, 23 Jun 2008 10:31:26 +0000
changeset 1052 22b509f8c898
parent 1051 40a4f31ec3b8
child 1053 0cb9604cbaa7
Added a timeout for Sdo configurations.
master/fsm_slave_config.c
--- a/master/fsm_slave_config.c	Mon Jun 23 10:27:40 2008 +0000
+++ b/master/fsm_slave_config.c	Mon Jun 23 10:31:26 2008 +0000
@@ -44,6 +44,10 @@
 #include "slave_config.h"
 #include "fsm_slave_config.h"
 
+/** Time in ms to wait for a response when downloading Sdo configurations.
+ */
+#define EC_FSM_SLAVE_CONF_SDO_CONF_TIMEOUT 3000
+
 /*****************************************************************************/
 
 void ec_fsm_slave_config_state_start(ec_fsm_slave_config_t *);
@@ -448,6 +452,7 @@
     fsm->request = list_entry(fsm->slave->config->sdo_configs.next,
             ec_sdo_request_t, list);
     ecrt_sdo_request_write(fsm->request);
+    fsm->request->response_timeout = EC_FSM_SLAVE_CONF_SDO_CONF_TIMEOUT;
     ec_fsm_coe_transfer(&fsm->fsm_coe, fsm->slave, fsm->request);
     ec_fsm_coe_exec(&fsm->fsm_coe); // execute immediately
 }