master/master.c
changeset 990 4f223f3df05a
parent 986 a486591ba86b
child 992 50a44cbd30af
--- a/master/master.c	Wed Jun 11 13:01:21 2008 +0000
+++ b/master/master.c	Wed Jun 11 15:29:47 2008 +0000
@@ -1101,6 +1101,40 @@
 
 /*****************************************************************************/
 
+unsigned int ec_master_config_count(
+		const ec_master_t *master /**< EtherCAT master. */
+		)
+{
+	const ec_slave_config_t *sc;
+	unsigned int count = 0;
+
+	list_for_each_entry(sc, &master->configs, list) {
+		count++;
+	}
+
+	return count;
+}
+
+/*****************************************************************************/
+
+const ec_slave_config_t *ec_master_get_config_const(
+		const ec_master_t *master, /**< EtherCAT master. */
+		unsigned int index /**< List position. */
+		)
+{
+	const ec_slave_config_t *sc;
+
+	list_for_each_entry(sc, &master->configs, list) {
+		if (index--)
+			continue;
+		return sc;
+	}
+
+	return NULL;
+}
+
+/*****************************************************************************/
+
 unsigned int ec_master_domain_count(
 		const ec_master_t *master /**< EtherCAT master. */
 		)