master/domain.c
changeset 1092 69393cf60399
parent 1075 94c6e36e0f8d
child 1116 3f2df83335b8
equal deleted inserted replaced
1091:363205c2ebaf 1092:69393cf60399
   275     return 0;
   275     return 0;
   276 }
   276 }
   277 
   277 
   278 /*****************************************************************************/
   278 /*****************************************************************************/
   279 
   279 
       
   280 /** Get the number of FMMU configurations of the domain.
       
   281  */
   280 unsigned int ec_domain_fmmu_count(const ec_domain_t *domain)
   282 unsigned int ec_domain_fmmu_count(const ec_domain_t *domain)
   281 {
   283 {
   282     const ec_fmmu_config_t *fmmu;
   284     const ec_fmmu_config_t *fmmu;
   283     unsigned int num = 0;
   285     unsigned int num = 0;
   284 
   286 
   289     return num;
   291     return num;
   290 }
   292 }
   291 
   293 
   292 /*****************************************************************************/
   294 /*****************************************************************************/
   293 
   295 
       
   296 /** Get a certain FMMU configuration via its position in the list.
       
   297  */
   294 const ec_fmmu_config_t *ec_domain_find_fmmu(
   298 const ec_fmmu_config_t *ec_domain_find_fmmu(
   295         const ec_domain_t *domain,
   299         const ec_domain_t *domain, /**< EtherCAT domain. */
   296         unsigned int index
   300         unsigned int pos /**< List position. */
   297         )
   301         )
   298 {
   302 {
   299     const ec_fmmu_config_t *fmmu;
   303     const ec_fmmu_config_t *fmmu;
   300 
   304 
   301     list_for_each_entry(fmmu, &domain->fmmu_configs, list) {
   305     list_for_each_entry(fmmu, &domain->fmmu_configs, list) {
   302         if (index--)
   306         if (pos--)
   303             continue;
   307             continue;
   304         return fmmu;
   308         return fmmu;
   305     }
   309     }
   306 
   310 
   307     return NULL;
   311     return NULL;