Renamed ec_pdo_mapping_find_pdo() to ec_pdo_mapping_find_pdo_const().
authorFlorian Pose <fp@igh-essen.com>
Thu, 28 Feb 2008 13:41:02 +0000
changeset 839 e0757d452fc9
parent 838 3cb5769059f4
child 840 64beeb6ce8e3
Renamed ec_pdo_mapping_find_pdo() to ec_pdo_mapping_find_pdo_const().
master/pdo_mapping.c
master/pdo_mapping.h
master/slave.c
--- a/master/pdo_mapping.c	Thu Feb 28 11:23:34 2008 +0000
+++ b/master/pdo_mapping.c	Thu Feb 28 13:41:02 2008 +0000
@@ -318,14 +318,14 @@
 
 /*****************************************************************************/
 
-/** Finds a Pdo with the given index.
- */
-const ec_pdo_t *ec_pdo_mapping_find_pdo(
+/** Finds a Pdo with the given index and returns a const pointer.
+ */
+const ec_pdo_t *ec_pdo_mapping_find_pdo_const(
         const ec_pdo_mapping_t *pm, /**< Pdo mapping. */
         uint16_t index /**< Pdo index. */
         )
 {
-    ec_pdo_t *pdo;
+    const ec_pdo_t *pdo;
 
     list_for_each_entry(pdo, &pm->pdos, list) {
         if (pdo->index != index)
--- a/master/pdo_mapping.h	Thu Feb 28 11:23:34 2008 +0000
+++ b/master/pdo_mapping.h	Thu Feb 28 13:41:02 2008 +0000
@@ -73,7 +73,8 @@
 uint16_t ec_pdo_mapping_total_size(const ec_pdo_mapping_t *);
 int ec_pdo_mapping_equal(const ec_pdo_mapping_t *, const ec_pdo_mapping_t *);
 
-const ec_pdo_t *ec_pdo_mapping_find_pdo(const ec_pdo_mapping_t *, uint16_t);
+const ec_pdo_t *ec_pdo_mapping_find_pdo_const(const ec_pdo_mapping_t *,
+        uint16_t);
 
 /*****************************************************************************/
 
--- a/master/slave.c	Thu Feb 28 11:23:34 2008 +0000
+++ b/master/slave.c	Thu Feb 28 13:41:02 2008 +0000
@@ -1253,7 +1253,7 @@
     for (i = 0; i < slave->sii.sync_count; i++) {
         sync = &slave->sii.syncs[i];
 
-        if (!(pdo = ec_pdo_mapping_find_pdo(&sync->mapping, index)))
+        if (!(pdo = ec_pdo_mapping_find_pdo_const(&sync->mapping, index)))
             continue;
 
         return pdo;