master/slave.c
changeset 967 93807963b906
parent 964 957f21465052
child 977 167ae3e76cc7
equal deleted inserted replaced
966:f1a7ea8a550a 967:93807963b906
  1198         )
  1198         )
  1199 {
  1199 {
  1200     ec_sdo_t *sdo;
  1200     ec_sdo_t *sdo;
  1201 
  1201 
  1202     list_for_each_entry(sdo, &slave->sdo_dictionary, list) {
  1202     list_for_each_entry(sdo, &slave->sdo_dictionary, list) {
  1203         if (sdo->index != index) continue;
  1203         if (sdo->index != index)
       
  1204             continue;
       
  1205         return sdo;
       
  1206     }
       
  1207 
       
  1208     return NULL;
       
  1209 }
       
  1210 
       
  1211 /*****************************************************************************/
       
  1212 
       
  1213 /**
       
  1214  * Get an Sdo from the dictionary.
       
  1215  *
       
  1216  * const version.
       
  1217  *
       
  1218  * \returns The desired Sdo, or NULL.
       
  1219  */
       
  1220 
       
  1221 const ec_sdo_t *ec_slave_get_sdo_const(
       
  1222         const ec_slave_t *slave, /**< EtherCAT slave */
       
  1223         uint16_t index /**< Sdo index */
       
  1224         )
       
  1225 {
       
  1226     const ec_sdo_t *sdo;
       
  1227 
       
  1228     list_for_each_entry(sdo, &slave->sdo_dictionary, list) {
       
  1229         if (sdo->index != index)
       
  1230             continue;
  1204         return sdo;
  1231         return sdo;
  1205     }
  1232     }
  1206 
  1233 
  1207     return NULL;
  1234     return NULL;
  1208 }
  1235 }