Added ec_master_find_domain_const().
This commit is contained in:
parent
f10cc06840
commit
20911256c3
|
|
@ -1124,20 +1124,35 @@ unsigned int ec_master_domain_count(
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define EC_FIND_DOMAIN \
|
||||
do { \
|
||||
list_for_each_entry(domain, &master->domains, list) { \
|
||||
if (index--) \
|
||||
continue; \
|
||||
return domain; \
|
||||
} \
|
||||
\
|
||||
return NULL; \
|
||||
} while (0)
|
||||
|
||||
ec_domain_t *ec_master_find_domain(
|
||||
ec_master_t *master, /**< EtherCAT master. */
|
||||
unsigned int index /**< Domain index. */
|
||||
)
|
||||
{
|
||||
ec_domain_t *domain;
|
||||
EC_FIND_DOMAIN;
|
||||
}
|
||||
|
||||
list_for_each_entry(domain, &master->domains, list) {
|
||||
if (index--)
|
||||
continue;
|
||||
return domain;
|
||||
}
|
||||
/*****************************************************************************/
|
||||
|
||||
return NULL;
|
||||
const ec_domain_t *ec_master_find_domain_const(
|
||||
const ec_master_t *master, /**< EtherCAT master. */
|
||||
unsigned int index /**< Domain index. */
|
||||
)
|
||||
{
|
||||
const ec_domain_t *domain;
|
||||
EC_FIND_DOMAIN;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
|||
|
|
@ -203,6 +203,8 @@ const ec_slave_config_t *ec_master_get_config_const(
|
|||
const ec_master_t *, unsigned int);
|
||||
unsigned int ec_master_domain_count(const ec_master_t *);
|
||||
ec_domain_t *ec_master_find_domain(ec_master_t *, unsigned int);
|
||||
const ec_domain_t *ec_master_find_domain_const(const ec_master_t *,
|
||||
unsigned int);
|
||||
|
||||
int ec_master_debug_level(ec_master_t *, int);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue