Added ec_slave_config_find_sdo_request().
--- a/master/slave_config.c Mon Feb 02 13:32:48 2009 +0000
+++ b/master/slave_config.c Mon Feb 02 13:34:01 2009 +0000
@@ -359,6 +359,26 @@
/** Finds a VoE handler via its position in the list.
*/
+ec_sdo_request_t *ec_slave_config_find_sdo_request(
+ ec_slave_config_t *sc, /**< Slave configuration. */
+ unsigned int pos /**< Position in the list. */
+ )
+{
+ ec_sdo_request_t *req;
+
+ list_for_each_entry(req, &sc->sdo_requests, list) {
+ if (pos--)
+ continue;
+ return req;
+ }
+
+ 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. */
--- a/master/slave_config.h Mon Feb 02 13:32:48 2009 +0000
+++ b/master/slave_config.h Mon Feb 02 13:34:01 2009 +0000
@@ -82,6 +82,8 @@
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_slave_config_t *, unsigned int);
+ec_sdo_request_t *ec_slave_config_find_sdo_request(ec_slave_config_t *,
+ unsigned int);
ec_voe_handler_t *ec_slave_config_find_voe_handler(ec_slave_config_t *,
unsigned int);