diff -r 5a58606726f3 -r 068a58b96965 master/pdo_mapping.c --- a/master/pdo_mapping.c Tue Feb 19 14:05:59 2008 +0000 +++ b/master/pdo_mapping.c Tue Feb 19 14:06:50 2008 +0000 @@ -317,3 +317,23 @@ } /*****************************************************************************/ + +/** Finds a Pdo with the given index. + */ +const ec_pdo_t *ec_pdo_mapping_find_pdo( + const ec_pdo_mapping_t *pm, /**< Pdo mapping. */ + uint16_t index /**< Pdo index. */ + ) +{ + ec_pdo_t *pdo; + + list_for_each_entry(pdo, &pm->pdos, list) { + if (pdo->index != index) + continue; + return pdo; + } + + return NULL; +} + +/*****************************************************************************/