39 * request a master, to map process data, to communicate with slaves via CoE |
39 * request a master, to map process data, to communicate with slaves via CoE |
40 * and to configure and activate the bus. |
40 * and to configure and activate the bus. |
41 * |
41 * |
42 * Changes in version 1.5: |
42 * Changes in version 1.5: |
43 * |
43 * |
44 * - Added the distributed clocks feature and the respective methods |
44 * - Added the distributed clocks feature and the respective method |
45 * ecrt_slave_config_dc_assign_activate() and |
45 * ecrt_slave_config_dc() to configure a slave for cyclic |
46 * ecrt_slave_config_dc_sync_signals() to configure a slave for cyclic |
|
47 * operation, and ecrt_master_application_time(), |
46 * operation, and ecrt_master_application_time(), |
48 * ecrt_master_sync_reference_clock() and ecrt_master_sync_slave_clocks() |
47 * ecrt_master_sync_reference_clock() and ecrt_master_sync_slave_clocks() |
49 * for offset and drift compensation. The EC_TIMEVAL2NANO() macro can be |
48 * for offset and drift compensation. The EC_TIMEVAL2NANO() macro can be |
50 * used for epoch time conversion. |
49 * used for epoch time conversion. |
51 * - Changed the meaning of the negative return values of |
50 * - Changed the meaning of the negative return values of |
770 ec_domain_t *domain, /**< Domain. */ |
769 ec_domain_t *domain, /**< Domain. */ |
771 unsigned int *bit_position /**< Optional address if bit addressing |
770 unsigned int *bit_position /**< Optional address if bit addressing |
772 is desired */ |
771 is desired */ |
773 ); |
772 ); |
774 |
773 |
775 /** Sets the AssignActivate word necessary for DC operation. |
774 /** Configure distributed clocks. |
|
775 * |
|
776 * Sets the AssignActivate word and the cycle and shift times for the sync |
|
777 * signals. |
776 * |
778 * |
777 * The AssignActivate word is vendor-specific and can be taken from the XML |
779 * The AssignActivate word is vendor-specific and can be taken from the XML |
778 * device description file (Device -> Dc -> AssignActivate). Set this to zero, |
780 * device description file (Device -> Dc -> AssignActivate). Set this to zero, |
779 * if the slave shall be operated without distributed clocks (default). |
781 * if the slave shall be operated without distributed clocks (default). |
780 */ |
782 */ |
781 void ecrt_slave_config_dc_assign_activate( |
783 void ecrt_slave_config_dc( |
782 ec_slave_config_t *sc, /**< Slave configuration. */ |
784 ec_slave_config_t *sc, /**< Slave configuration. */ |
783 uint16_t assign_activate /**< AssignActivate word. */ |
785 uint16_t assign_activate, /**< AssignActivate word. */ |
784 ); |
|
785 |
|
786 /** Sets the cycle and shift times for the sync signals. |
|
787 */ |
|
788 void ecrt_slave_config_dc_sync_signals( |
|
789 ec_slave_config_t *sc, /**< Slave configuration. */ |
|
790 uint32_t sync0_cycle, /**< SYNC0 cycle time [ns]. */ |
786 uint32_t sync0_cycle, /**< SYNC0 cycle time [ns]. */ |
791 uint32_t sync0_shift, /**< SYNC0 shift time [ns]. */ |
787 uint32_t sync0_shift, /**< SYNC0 shift time [ns]. */ |
792 uint32_t sync1_cycle, /**< SYNC1 cycle time [ns]. */ |
788 uint32_t sync1_cycle, /**< SYNC1 cycle time [ns]. */ |
793 uint32_t sync1_shift /**< SYNC1 shift time [ns]. */ |
789 uint32_t sync1_shift /**< SYNC1 shift time [ns]. */ |
794 ); |
790 ); |