304 /** EtherCAT slave port descriptor. |
304 /** EtherCAT slave port descriptor. |
305 */ |
305 */ |
306 typedef enum { |
306 typedef enum { |
307 EC_PORT_NOT_IMPLEMENTED, /**< Port is not implemented. */ |
307 EC_PORT_NOT_IMPLEMENTED, /**< Port is not implemented. */ |
308 EC_PORT_NOT_CONFIGURED, /**< Port is not configured. */ |
308 EC_PORT_NOT_CONFIGURED, /**< Port is not configured. */ |
309 EC_PORT_EBUS, /**< Port is an e-bus. */ |
309 EC_PORT_EBUS, /**< Port is an E-Bus. */ |
310 EC_PORT_MII /**< Port is a mii. */ |
310 EC_PORT_MII /**< Port is a MII. */ |
311 } ec_slave_port_desc_t; |
311 } ec_slave_port_desc_t; |
312 |
312 |
313 /*****************************************************************************/ |
313 /*****************************************************************************/ |
314 |
314 |
315 /** EtherCAT slave port information. |
315 /** EtherCAT slave port information. |
599 */ |
599 */ |
600 void ecrt_master_callbacks( |
600 void ecrt_master_callbacks( |
601 ec_master_t *master, /**< EtherCAT master */ |
601 ec_master_t *master, /**< EtherCAT master */ |
602 void (*send_cb)(void *), /**< Datagram sending callback. */ |
602 void (*send_cb)(void *), /**< Datagram sending callback. */ |
603 void (*receive_cb)(void *), /**< Receive callback. */ |
603 void (*receive_cb)(void *), /**< Receive callback. */ |
604 void *cb_data /**< Arbitraty pointer passed to the callback functions. |
604 void *cb_data /**< Arbitrary pointer passed to the callback functions. |
605 */ |
605 */ |
606 ); |
606 ); |
607 |
607 |
608 #endif /* __KERNEL__ */ |
608 #endif /* __KERNEL__ */ |
609 |
609 |
978 */ |
978 */ |
979 void ecrt_master_sync_slave_clocks( |
979 void ecrt_master_sync_slave_clocks( |
980 ec_master_t *master /**< EtherCAT master. */ |
980 ec_master_t *master /**< EtherCAT master. */ |
981 ); |
981 ); |
982 |
982 |
983 /** Queues the DC synchonity monitoring datagram for sending. |
983 /** Queues the DC synchrony monitoring datagram for sending. |
984 * |
984 * |
985 * The datagram broadcast-reads all "System time difference" registers (\a |
985 * The datagram broadcast-reads all "System time difference" registers (\a |
986 * 0x092c) to get an upper estiomation of the DC synchony. The result can be |
986 * 0x092c) to get an upper estimation of the DC synchrony. The result can be |
987 * checked with the ecrt_master_sync_monitor_process() method. |
987 * checked with the ecrt_master_sync_monitor_process() method. |
988 */ |
988 */ |
989 void ecrt_master_sync_monitor_queue( |
989 void ecrt_master_sync_monitor_queue( |
990 ec_master_t *master /**< EtherCAT master. */ |
990 ec_master_t *master /**< EtherCAT master. */ |
991 ); |
991 ); |
992 |
992 |
993 /** Processes the DC synchonity monitoring datagram. |
993 /** Processes the DC synchrony monitoring datagram. |
994 * |
994 * |
995 * If the sync monitoring datagram was sent before with |
995 * If the sync monitoring datagram was sent before with |
996 * ecrt_master_sync_monitor_queue(), the result can be queried with this |
996 * ecrt_master_sync_monitor_queue(), the result can be queried with this |
997 * method. |
997 * method. |
998 * |
998 * |
999 * \return Upper estination of the maximum time difference in ns. |
999 * \return Upper estimation of the maximum time difference in ns. |
1000 */ |
1000 */ |
1001 uint32_t ecrt_master_sync_monitor_process( |
1001 uint32_t ecrt_master_sync_monitor_process( |
1002 ec_master_t *master /**< EtherCAT master. */ |
1002 ec_master_t *master /**< EtherCAT master. */ |
1003 ); |
1003 ); |
1004 |
1004 |
1037 void ecrt_slave_config_watchdog( |
1037 void ecrt_slave_config_watchdog( |
1038 ec_slave_config_t *sc, /**< Slave configuration. */ |
1038 ec_slave_config_t *sc, /**< Slave configuration. */ |
1039 uint16_t watchdog_divider, /**< Number of 40 ns intervals. Used as a |
1039 uint16_t watchdog_divider, /**< Number of 40 ns intervals. Used as a |
1040 base unit for all slave watchdogs. If set |
1040 base unit for all slave watchdogs. If set |
1041 to zero, the value is not written, so the |
1041 to zero, the value is not written, so the |
1042 default ist used. */ |
1042 default is used. */ |
1043 uint16_t watchdog_intervals /**< Number of base intervals for process |
1043 uint16_t watchdog_intervals /**< Number of base intervals for process |
1044 data watchdog. If set to zero, the value |
1044 data watchdog. If set to zero, the value |
1045 is not written, so the default is used. |
1045 is not written, so the default is used. |
1046 */ |
1046 */ |
1047 ); |
1047 ); |
1416 * configuration object and is written to the slave whenever the slave is |
1416 * configuration object and is written to the slave whenever the slave is |
1417 * being configured by the master. This usually happens once on master |
1417 * being configured by the master. This usually happens once on master |
1418 * activation, but can be repeated subsequently, for example after the slave's |
1418 * activation, but can be repeated subsequently, for example after the slave's |
1419 * power supply failed. |
1419 * power supply failed. |
1420 * |
1420 * |
1421 * The \a idn parameter can be separated into serveral sections: |
1421 * The \a idn parameter can be separated into several sections: |
1422 * - Bit 15: Standard data (0) or Product data (1) |
1422 * - Bit 15: Standard data (0) or Product data (1) |
1423 * - Bit 14 - 12: Parameter set (0 - 7) |
1423 * - Bit 14 - 12: Parameter set (0 - 7) |
1424 * - Bit 11 - 0: Data block number (0 - 4095) |
1424 * - Bit 11 - 0: Data block number (0 - 4095) |
1425 * |
1425 * |
1426 * Please note that the this function does not do any endianess correction. |
1426 * Please note that the this function does not do any endianess correction. |