equal
deleted
inserted
replaced
118 |
118 |
119 /** EtherCAT realtime interface version word. |
119 /** EtherCAT realtime interface version word. |
120 */ |
120 */ |
121 #define ECRT_VERSION_MAGIC ECRT_VERSION(ECRT_VER_MAJOR, ECRT_VER_MINOR) |
121 #define ECRT_VERSION_MAGIC ECRT_VERSION(ECRT_VER_MAJOR, ECRT_VER_MINOR) |
122 |
122 |
|
123 /*****************************************************************************/ |
|
124 |
|
125 /** End of mapping. |
|
126 * |
|
127 * This is used in ecrt_slave_config_mapping(). |
|
128 */ |
|
129 #define EC_MAP_END ~0U |
|
130 |
123 /****************************************************************************** |
131 /****************************************************************************** |
124 * Data types |
132 * Data types |
125 *****************************************************************************/ |
133 *****************************************************************************/ |
126 |
134 |
127 struct ec_master; |
135 struct ec_master; |
465 * |
473 * |
466 * if (ecrt_slave_config_mapping(slave_config_ana_in, 2, pdo_mapping)) |
474 * if (ecrt_slave_config_mapping(slave_config_ana_in, 2, pdo_mapping)) |
467 * return -1; // error |
475 * return -1; // error |
468 * \endcode |
476 * \endcode |
469 * |
477 * |
|
478 * Processing of \a pdo_infos will stop, if |
|
479 * - the number of processed items reaches \a n_infos, or |
|
480 * - the \a dir member of an ec_pdo_info_t item is EC_MAP_END. In this case, |
|
481 * \a n_infos should set to a number greater than the number of list items; |
|
482 * using EC_MAP_END is recommended. |
|
483 * |
470 * \return zero on success, else non-zero |
484 * \return zero on success, else non-zero |
471 */ |
485 */ |
472 int ecrt_slave_config_mapping( |
486 int ecrt_slave_config_mapping( |
473 ec_slave_config_t *sc, /**< Slave configuration. */ |
487 ec_slave_config_t *sc, /**< Slave configuration. */ |
474 unsigned int n_infos, /**< Number of Pdo infos in \a pdo_infos. */ |
488 unsigned int n_infos, /**< Number of Pdo infos in \a pdo_infos. */ |