master/fsm.c
changeset 521 a25593417791
parent 520 d778acff9592
child 522 de914aa62273
equal deleted inserted replaced
520:d778acff9592 521:a25593417791
   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");
   196 }
   197 }
   197 
   198 
   198 /*****************************************************************************/
   199 /*****************************************************************************/
   199 
   200 
   200 /**
   201 /**
   317                                          )
   318                                          )
   318 {
   319 {
   319     ec_master_t *master = fsm->master;
   320     ec_master_t *master = fsm->master;
   320     ec_slave_t *slave;
   321     ec_slave_t *slave;
   321     char old_state[EC_STATE_STRING_SIZE], new_state[EC_STATE_STRING_SIZE];
   322     char old_state[EC_STATE_STRING_SIZE], new_state[EC_STATE_STRING_SIZE];
       
   323     
       
   324     EC_DBG("process_states()\n");
   322 
   325 
   323     // check if any slaves are not in the state, they're supposed to be
   326     // check if any slaves are not in the state, they're supposed to be
   324     list_for_each_entry(slave, &master->slaves, list) {
   327     list_for_each_entry(slave, &master->slaves, list) {
   325         if (slave->error_flag
   328         if (slave->error_flag
   326             || !slave->online
   329             || !slave->online