master/pdo_mapping.c
changeset 799 068a58b96965
parent 793 3b297ff8284f
child 814 a51f857b1b2d
equal deleted inserted replaced
798:5a58606726f3 799:068a58b96965
   315 
   315 
   316     return 1;
   316     return 1;
   317 }
   317 }
   318 
   318 
   319 /*****************************************************************************/
   319 /*****************************************************************************/
       
   320 
       
   321 /** Finds a Pdo with the given index.
       
   322  */
       
   323 const ec_pdo_t *ec_pdo_mapping_find_pdo(
       
   324         const ec_pdo_mapping_t *pm, /**< Pdo mapping. */
       
   325         uint16_t index /**< Pdo index. */
       
   326         )
       
   327 {
       
   328     ec_pdo_t *pdo;
       
   329 
       
   330     list_for_each_entry(pdo, &pm->pdos, list) {
       
   331         if (pdo->index != index)
       
   332             continue;
       
   333         return pdo;
       
   334     }
       
   335 
       
   336     return NULL;
       
   337 }
       
   338 
       
   339 /*****************************************************************************/