# HG changeset patch # User Florian Pose # Date 1214216860 0 # Node ID 40a4f31ec3b8416dc755e23c6a16ef5bce2de56e # Parent c6afe1cbfaf733f48c009bd45bf4824376850c8e Added ec_pdo_list_print(). diff -r c6afe1cbfaf7 -r 40a4f31ec3b8 master/pdo_list.c --- a/master/pdo_list.c Mon Jun 23 10:26:47 2008 +0000 +++ b/master/pdo_list.c Mon Jun 23 10:27:40 2008 +0000 @@ -318,3 +318,20 @@ } /*****************************************************************************/ + +/** 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(" "); + } +} + +/*****************************************************************************/ diff -r c6afe1cbfaf7 -r 40a4f31ec3b8 master/pdo_list.h --- a/master/pdo_list.h Mon Jun 23 10:26:47 2008 +0000 +++ b/master/pdo_list.h Mon Jun 23 10:27:40 2008 +0000 @@ -79,6 +79,8 @@ 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