Skip to content
Snippets Groups Projects
Commit dbd46747 authored by Florian Pose's avatar Florian Pose
Browse files

Renamed ec_pdo_mapping_find_pdo() to ec_pdo_mapping_find_pdo_const().

parent c7b6db9c
No related branches found
No related tags found
No related merge requests found
...@@ -318,14 +318,14 @@ int ec_pdo_mapping_equal( ...@@ -318,14 +318,14 @@ int ec_pdo_mapping_equal(
/*****************************************************************************/ /*****************************************************************************/
/** Finds a Pdo with the given index. /** Finds a Pdo with the given index and returns a const pointer.
*/ */
const ec_pdo_t *ec_pdo_mapping_find_pdo( const ec_pdo_t *ec_pdo_mapping_find_pdo_const(
const ec_pdo_mapping_t *pm, /**< Pdo mapping. */ const ec_pdo_mapping_t *pm, /**< Pdo mapping. */
uint16_t index /**< Pdo index. */ uint16_t index /**< Pdo index. */
) )
{ {
ec_pdo_t *pdo; const ec_pdo_t *pdo;
list_for_each_entry(pdo, &pm->pdos, list) { list_for_each_entry(pdo, &pm->pdos, list) {
if (pdo->index != index) if (pdo->index != index)
......
...@@ -73,7 +73,8 @@ int ec_pdo_mapping_copy(ec_pdo_mapping_t *, const ec_pdo_mapping_t *); ...@@ -73,7 +73,8 @@ int ec_pdo_mapping_copy(ec_pdo_mapping_t *, const ec_pdo_mapping_t *);
uint16_t ec_pdo_mapping_total_size(const ec_pdo_mapping_t *); 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 *); 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);
/*****************************************************************************/ /*****************************************************************************/
......
...@@ -1253,7 +1253,7 @@ const ec_pdo_t *ec_slave_find_pdo( ...@@ -1253,7 +1253,7 @@ const ec_pdo_t *ec_slave_find_pdo(
for (i = 0; i < slave->sii.sync_count; i++) { for (i = 0; i < slave->sii.sync_count; i++) {
sync = &slave->sii.syncs[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; continue;
return pdo; return pdo;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment