64 * ecrt_master_reference_clock_time() and the feature flag |
64 * ecrt_master_reference_clock_time() and the feature flag |
65 * EC_HAVE_REF_CLOCK_TIME to have the possibility to synchronize the master |
65 * EC_HAVE_REF_CLOCK_TIME to have the possibility to synchronize the master |
66 * clock to the reference clock. |
66 * clock to the reference clock. |
67 * - Changed the datatypes of the shift times in ecrt_slave_config_dc() to |
67 * - Changed the datatypes of the shift times in ecrt_slave_config_dc() to |
68 * int32_t to correctly display negative shift times. |
68 * int32_t to correctly display negative shift times. |
|
69 * - Added ecrt_slave_config_reg_pdo_entry_pos() and the feature flag |
|
70 * EC_HAVE_REG_BY_POS for registering PDO entries with non-unique indices |
|
71 * via their positions in the mapping. |
69 * |
72 * |
70 * Changes in version 1.5: |
73 * Changes in version 1.5: |
71 * |
74 * |
72 * - Added the distributed clocks feature and the respective method |
75 * - Added the distributed clocks feature and the respective method |
73 * ecrt_slave_config_dc() to configure a slave for cyclic operation, and |
76 * ecrt_slave_config_dc() to configure a slave for cyclic operation, and |
178 |
181 |
179 /* Defined if the method ecrt_master_reference_clock_time() is available. |
182 /* Defined if the method ecrt_master_reference_clock_time() is available. |
180 */ |
183 */ |
181 #define EC_HAVE_REF_CLOCK_TIME |
184 #define EC_HAVE_REF_CLOCK_TIME |
182 |
185 |
|
186 /* Defined if the method ecrt_slave_config_reg_pdo_entry_pos() is available. |
|
187 */ |
|
188 #define EC_HAVE_REG_BY_POS |
|
189 |
183 /*****************************************************************************/ |
190 /*****************************************************************************/ |
184 |
191 |
185 /** End of list marker. |
192 /** End of list marker. |
186 * |
193 * |
187 * This can be used with ecrt_slave_config_pdos(). |
194 * This can be used with ecrt_slave_config_pdos(). |
1258 ec_domain_t *domain, /**< Domain. */ |
1265 ec_domain_t *domain, /**< Domain. */ |
1259 unsigned int *bit_position /**< Optional address if bit addressing |
1266 unsigned int *bit_position /**< Optional address if bit addressing |
1260 is desired */ |
1267 is desired */ |
1261 ); |
1268 ); |
1262 |
1269 |
|
1270 /** Registers a PDO entry using its position. |
|
1271 * |
|
1272 * Similar to ecrt_slave_config_reg_pdo_entry(), but not using PDO indices but |
|
1273 * offsets in the PDO mapping, because PDO entry indices may not be unique |
|
1274 * inside a slave's PDO mapping. An error is raised, if |
|
1275 * one of the given positions is out of range. |
|
1276 * |
|
1277 * \retval >=0 Success: Offset of the PDO entry's process data. |
|
1278 * \retval <0 Error code. |
|
1279 */ |
|
1280 int ecrt_slave_config_reg_pdo_entry_pos( |
|
1281 ec_slave_config_t *sc, /**< Slave configuration. */ |
|
1282 uint8_t sync_index, /**< Sync manager index. */ |
|
1283 unsigned int pdo_pos, /**< Position of the PDO inside the SM. */ |
|
1284 unsigned int entry_pos, /**< Position of the entry inside the PDO. */ |
|
1285 ec_domain_t *domain, /**< Domain. */ |
|
1286 unsigned int *bit_position /**< Optional address if bit addressing |
|
1287 is desired */ |
|
1288 ); |
|
1289 |
1263 /** Configure distributed clocks. |
1290 /** Configure distributed clocks. |
1264 * |
1291 * |
1265 * Sets the AssignActivate word and the cycle and shift times for the sync |
1292 * Sets the AssignActivate word and the cycle and shift times for the sync |
1266 * signals. |
1293 * signals. |
1267 * |
1294 * |