equal
deleted
inserted
replaced
1120 return count; |
1120 return count; |
1121 } |
1121 } |
1122 |
1122 |
1123 /*****************************************************************************/ |
1123 /*****************************************************************************/ |
1124 |
1124 |
|
1125 /** Common implementation for ec_master_find_domain() and |
|
1126 * ec_master_find_domain_const(). |
|
1127 */ |
1125 #define EC_FIND_DOMAIN \ |
1128 #define EC_FIND_DOMAIN \ |
1126 do { \ |
1129 do { \ |
1127 list_for_each_entry(domain, &master->domains, list) { \ |
1130 list_for_each_entry(domain, &master->domains, list) { \ |
1128 if (index--) \ |
1131 if (index--) \ |
1129 continue; \ |
1132 continue; \ |
1140 { |
1143 { |
1141 ec_domain_t *domain; |
1144 ec_domain_t *domain; |
1142 EC_FIND_DOMAIN; |
1145 EC_FIND_DOMAIN; |
1143 } |
1146 } |
1144 |
1147 |
1145 /*****************************************************************************/ |
|
1146 |
|
1147 const ec_domain_t *ec_master_find_domain_const( |
1148 const ec_domain_t *ec_master_find_domain_const( |
1148 const ec_master_t *master, /**< EtherCAT master. */ |
1149 const ec_master_t *master, /**< EtherCAT master. */ |
1149 unsigned int index /**< Domain index. */ |
1150 unsigned int index /**< Domain index. */ |
1150 ) |
1151 ) |
1151 { |
1152 { |