master/slave.c
branchstable-1.5
changeset 2421 bc2d4bf9cbe5
parent 2374 e898451c054a
child 2443 2c3ccdde3919
equal deleted inserted replaced
2420:69056c46aa4d 2421:bc2d4bf9cbe5
   257     ec_datagram_clear(&slave->fsm_datagram);
   257     ec_datagram_clear(&slave->fsm_datagram);
   258 }
   258 }
   259 
   259 
   260 /*****************************************************************************/
   260 /*****************************************************************************/
   261 
   261 
   262 /** Clear the sync manager array. 
   262 /** Clear the sync manager array.
   263  */
   263  */
   264 void ec_slave_clear_sync_managers(ec_slave_t *slave /**< EtherCAT slave. */)
   264 void ec_slave_clear_sync_managers(ec_slave_t *slave /**< EtherCAT slave. */)
   265 {
   265 {
   266     unsigned int i;
   266     unsigned int i;
   267 
   267 
   577 char *ec_slave_sii_string(
   577 char *ec_slave_sii_string(
   578         ec_slave_t *slave, /**< EtherCAT slave */
   578         ec_slave_t *slave, /**< EtherCAT slave */
   579         unsigned int index /**< string index */
   579         unsigned int index /**< string index */
   580         )
   580         )
   581 {
   581 {
   582     if (!index--) 
   582     if (!index--)
   583         return NULL;
   583         return NULL;
   584 
   584 
   585     if (index >= slave->sii.string_count) {
   585     if (index >= slave->sii.string_count) {
   586         EC_SLAVE_DBG(slave, 1, "String %u not found.\n", index);
   586         EC_SLAVE_DBG(slave, 1, "String %u not found.\n", index);
   587         return NULL;
   587         return NULL;
   792         )
   792         )
   793 {
   793 {
   794     unsigned int i;
   794     unsigned int i;
   795     ec_sync_t *sync;
   795     ec_sync_t *sync;
   796     ec_pdo_t *pdo;
   796     ec_pdo_t *pdo;
   797     
   797 
   798     for (i = 0; i < slave->sii.sync_count; i++) {
   798     for (i = 0; i < slave->sii.sync_count; i++) {
   799         sync = slave->sii.syncs + i;
   799         sync = slave->sii.syncs + i;
   800         list_for_each_entry(pdo, &sync->pdos.list, list) {
   800         list_for_each_entry(pdo, &sync->pdos.list, list) {
   801             ec_slave_find_names_for_pdo(slave, pdo);
   801             ec_slave_find_names_for_pdo(slave, pdo);
   802         }
   802         }