equal
deleted
inserted
replaced
1303 } |
1303 } |
1304 |
1304 |
1305 return NULL; |
1305 return NULL; |
1306 } |
1306 } |
1307 |
1307 |
|
1308 /*****************************************************************************/ |
|
1309 |
|
1310 unsigned int ec_master_domain_count( |
|
1311 const ec_master_t *master /**< EtherCAT master. */ |
|
1312 ) |
|
1313 { |
|
1314 const ec_domain_t *domain; |
|
1315 unsigned int count = 0; |
|
1316 |
|
1317 list_for_each_entry(domain, &master->domains, list) { |
|
1318 count++; |
|
1319 } |
|
1320 |
|
1321 return count; |
|
1322 } |
|
1323 |
|
1324 /*****************************************************************************/ |
|
1325 |
|
1326 ec_domain_t *ec_master_find_domain( |
|
1327 ec_master_t *master, /**< EtherCAT master. */ |
|
1328 unsigned int index /**< Domain index. */ |
|
1329 ) |
|
1330 { |
|
1331 ec_domain_t *domain; |
|
1332 |
|
1333 list_for_each_entry(domain, &master->domains, list) { |
|
1334 if (index--) |
|
1335 continue; |
|
1336 return domain; |
|
1337 } |
|
1338 |
|
1339 return NULL; |
|
1340 } |
|
1341 |
1308 /****************************************************************************** |
1342 /****************************************************************************** |
1309 * Realtime interface |
1343 * Realtime interface |
1310 *****************************************************************************/ |
1344 *****************************************************************************/ |
1311 |
1345 |
1312 ec_domain_t *ecrt_master_create_domain(ec_master_t *master /**< master */) |
1346 ec_domain_t *ecrt_master_create_domain(ec_master_t *master /**< master */) |