equal
deleted
inserted
replaced
1099 return NULL; |
1099 return NULL; |
1100 } |
1100 } |
1101 |
1101 |
1102 /*****************************************************************************/ |
1102 /*****************************************************************************/ |
1103 |
1103 |
|
1104 unsigned int ec_master_config_count( |
|
1105 const ec_master_t *master /**< EtherCAT master. */ |
|
1106 ) |
|
1107 { |
|
1108 const ec_slave_config_t *sc; |
|
1109 unsigned int count = 0; |
|
1110 |
|
1111 list_for_each_entry(sc, &master->configs, list) { |
|
1112 count++; |
|
1113 } |
|
1114 |
|
1115 return count; |
|
1116 } |
|
1117 |
|
1118 /*****************************************************************************/ |
|
1119 |
|
1120 const ec_slave_config_t *ec_master_get_config_const( |
|
1121 const ec_master_t *master, /**< EtherCAT master. */ |
|
1122 unsigned int index /**< List position. */ |
|
1123 ) |
|
1124 { |
|
1125 const ec_slave_config_t *sc; |
|
1126 |
|
1127 list_for_each_entry(sc, &master->configs, list) { |
|
1128 if (index--) |
|
1129 continue; |
|
1130 return sc; |
|
1131 } |
|
1132 |
|
1133 return NULL; |
|
1134 } |
|
1135 |
|
1136 /*****************************************************************************/ |
|
1137 |
1104 unsigned int ec_master_domain_count( |
1138 unsigned int ec_master_domain_count( |
1105 const ec_master_t *master /**< EtherCAT master. */ |
1139 const ec_master_t *master /**< EtherCAT master. */ |
1106 ) |
1140 ) |
1107 { |
1141 { |
1108 const ec_domain_t *domain; |
1142 const ec_domain_t *domain; |