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

Added ec_slave_config_find_voe_handler().

parent b04aa0af
No related branches found
No related tags found
No related merge requests found
...@@ -364,6 +364,26 @@ const ec_sdo_request_t *ec_slave_config_get_sdo_by_pos_const( ...@@ -364,6 +364,26 @@ const ec_sdo_request_t *ec_slave_config_get_sdo_by_pos_const(
return NULL; return NULL;
} }
/*****************************************************************************/
/** Finds a VoE handler via its position in the list.
*/
ec_voe_handler_t *ec_slave_config_find_voe_handler(
ec_slave_config_t *sc, /**< Slave configuration. */
unsigned int pos /**< Position in the list. */
)
{
ec_voe_handler_t *voe;
list_for_each_entry(voe, &sc->voe_handlers, list) {
if (pos--)
continue;
return voe;
}
return NULL;
}
/****************************************************************************** /******************************************************************************
* Realtime interface * Realtime interface
*****************************************************************************/ *****************************************************************************/
......
...@@ -89,6 +89,8 @@ void ec_slave_config_load_default_sync_config(ec_slave_config_t *); ...@@ -89,6 +89,8 @@ void ec_slave_config_load_default_sync_config(ec_slave_config_t *);
unsigned int ec_slave_config_sdo_count(const ec_slave_config_t *); unsigned int ec_slave_config_sdo_count(const ec_slave_config_t *);
const ec_sdo_request_t *ec_slave_config_get_sdo_by_pos_const( const ec_sdo_request_t *ec_slave_config_get_sdo_by_pos_const(
const ec_slave_config_t *, unsigned int); const ec_slave_config_t *, unsigned int);
ec_voe_handler_t *ec_slave_config_find_voe_handler(ec_slave_config_t *,
unsigned int);
/*****************************************************************************/ /*****************************************************************************/
......
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