Added ec_pdo_list_print().

This commit is contained in:
Florian Pose 2008-06-23 10:27:40 +00:00
parent 8bb85dba51
commit 4a6df220bb
2 changed files with 19 additions and 0 deletions

View File

@ -318,3 +318,20 @@ unsigned int ec_pdo_list_count(
}
/*****************************************************************************/
/** Outputs the Pdos in the list.
*/
void ec_pdo_list_print(
const ec_pdo_list_t *pl /**< Pdo list. */
)
{
const ec_pdo_t *pdo;
list_for_each_entry(pdo, &pl->list, list) {
printk("0x%04X", pdo->index);
if (pdo->list.next != &pl->list)
printk(" ");
}
}
/*****************************************************************************/

View File

@ -79,6 +79,8 @@ const ec_pdo_t *ec_pdo_list_find_pdo_by_pos_const(
const ec_pdo_list_t *, unsigned int);
unsigned int ec_pdo_list_count(const ec_pdo_list_t *);
void ec_pdo_list_print(const ec_pdo_list_t *);
/*****************************************************************************/
#endif