Added ec_pdo_list_print().
authorFlorian Pose <fp@igh-essen.com>
Mon, 23 Jun 2008 10:27:40 +0000
changeset 1051 40a4f31ec3b8
parent 1050 c6afe1cbfaf7
child 1052 22b509f8c898
Added ec_pdo_list_print().
master/pdo_list.c
master/pdo_list.h
--- 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(" ");
+    }
+}
+
+/*****************************************************************************/
--- 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