equal
deleted
inserted
replaced
191 void ec_fsm_master_start(ec_fsm_t *fsm) |
191 void ec_fsm_master_start(ec_fsm_t *fsm) |
192 { |
192 { |
193 ec_datagram_brd(&fsm->datagram, 0x0130, 2); |
193 ec_datagram_brd(&fsm->datagram, 0x0130, 2); |
194 ec_master_queue_datagram(fsm->master, &fsm->datagram); |
194 ec_master_queue_datagram(fsm->master, &fsm->datagram); |
195 fsm->master_state = ec_fsm_master_broadcast; |
195 fsm->master_state = ec_fsm_master_broadcast; |
196 EC_DBG("master_start)\n"); |
|
197 } |
196 } |
198 |
197 |
199 /*****************************************************************************/ |
198 /*****************************************************************************/ |
200 |
199 |
201 /** |
200 /** |
318 ) |
317 ) |
319 { |
318 { |
320 ec_master_t *master = fsm->master; |
319 ec_master_t *master = fsm->master; |
321 ec_slave_t *slave; |
320 ec_slave_t *slave; |
322 char old_state[EC_STATE_STRING_SIZE], new_state[EC_STATE_STRING_SIZE]; |
321 char old_state[EC_STATE_STRING_SIZE], new_state[EC_STATE_STRING_SIZE]; |
323 |
|
324 EC_DBG("process_states()\n"); |
|
325 |
322 |
326 // check if any slaves are not in the state, they're supposed to be |
323 // check if any slaves are not in the state, they're supposed to be |
327 list_for_each_entry(slave, &master->slaves, list) { |
324 list_for_each_entry(slave, &master->slaves, list) { |
328 if (slave->error_flag |
325 if (slave->error_flag |
329 || !slave->online |
326 || !slave->online |