diff -r 816663ca9370 -r 4f223f3df05a master/master.c --- 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. */ )