mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-09-25 19:43:49 +08:00
Renamed ec_pdo_mapping_find_pdo() to ec_pdo_mapping_find_pdo_const().
This commit is contained in:
@@ -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. */
|
||||
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)
|
||||
|
||||
@@ -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 *);
|
||||
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);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
+1
-1
@@ -1253,7 +1253,7 @@ const ec_pdo_t *ec_slave_find_pdo(
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user