# HG changeset patch # User Florian Pose # Date 1214217086 0 # Node ID 22b509f8c8982c8bdbbee0c90b10a0f51eb25160 # Parent 40a4f31ec3b8416dc755e23c6a16ef5bce2de56e Added a timeout for Sdo configurations. diff -r 40a4f31ec3b8 -r 22b509f8c898 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 }