Added ec_pdo_list_count().
--- a/master/pdo_list.c Fri May 30 14:50:57 2008 +0000
+++ b/master/pdo_list.c Mon Jun 02 08:54:51 2008 +0000
@@ -278,3 +278,21 @@
}
/*****************************************************************************/
+
+/**
+ */
+unsigned int ec_pdo_list_count(
+ const ec_pdo_list_t *pl /**< Pdo list. */
+ )
+{
+ const ec_pdo_t *pdo;
+ unsigned int num = 0;
+
+ list_for_each_entry(pdo, &pl->list, list) {
+ num++;
+ }
+
+ return num;
+}
+
+/*****************************************************************************/
--- a/master/pdo_list.h Fri May 30 14:50:57 2008 +0000
+++ b/master/pdo_list.h Mon Jun 02 08:54:51 2008 +0000
@@ -75,6 +75,7 @@
ec_pdo_t *ec_pdo_list_find_pdo(const ec_pdo_list_t *, uint16_t);
const ec_pdo_t *ec_pdo_list_find_pdo_const(const ec_pdo_list_t *,
uint16_t);
+unsigned int ec_pdo_list_count(const ec_pdo_list_t *);
/*****************************************************************************/