23 * the industrial property and similar rights of Beckhoff Automation GmbH. |
23 * the industrial property and similar rights of Beckhoff Automation GmbH. |
24 * |
24 * |
25 *****************************************************************************/ |
25 *****************************************************************************/ |
26 |
26 |
27 /** \file |
27 /** \file |
28 * EtherCAT Pdo entry configuration state machine structures. |
28 * EtherCAT PDO entry configuration state machine structures. |
29 */ |
29 */ |
30 |
30 |
31 /*****************************************************************************/ |
31 /*****************************************************************************/ |
32 |
32 |
33 #ifndef __EC_FSM_PDO_ENTRY_H__ |
33 #ifndef __EC_FSM_PDO_ENTRY_H__ |
43 /** |
43 /** |
44 * \see ec_fsm_pdo_entry |
44 * \see ec_fsm_pdo_entry |
45 */ |
45 */ |
46 typedef struct ec_fsm_pdo_entry ec_fsm_pdo_entry_t; |
46 typedef struct ec_fsm_pdo_entry ec_fsm_pdo_entry_t; |
47 |
47 |
48 /** Pdo configuration state machine. |
48 /** PDO configuration state machine. |
49 */ |
49 */ |
50 struct ec_fsm_pdo_entry |
50 struct ec_fsm_pdo_entry |
51 { |
51 { |
52 void (*state)(ec_fsm_pdo_entry_t *); /**< state function */ |
52 void (*state)(ec_fsm_pdo_entry_t *); /**< state function */ |
53 ec_fsm_coe_t *fsm_coe; /**< CoE state machine to use */ |
53 ec_fsm_coe_t *fsm_coe; /**< CoE state machine to use */ |
54 ec_sdo_request_t request; /**< Sdo request. */ |
54 ec_sdo_request_t request; /**< SDO request. */ |
55 |
55 |
56 ec_slave_t *slave; /**< Slave the FSM runs on. */ |
56 ec_slave_t *slave; /**< Slave the FSM runs on. */ |
57 ec_pdo_t *target_pdo; /**< Pdo to read the mapping for. */ |
57 ec_pdo_t *target_pdo; /**< PDO to read the mapping for. */ |
58 const ec_pdo_t *source_pdo; /**< Pdo with desired mapping. */ |
58 const ec_pdo_t *source_pdo; /**< PDO with desired mapping. */ |
59 const ec_pdo_entry_t *entry; /**< Current entry. */ |
59 const ec_pdo_entry_t *entry; /**< Current entry. */ |
60 unsigned int entry_count; /**< Number of entries. */ |
60 unsigned int entry_count; /**< Number of entries. */ |
61 unsigned int entry_pos; /**< Position in Pdo mapping. */ |
61 unsigned int entry_pos; /**< Position in PDO mapping. */ |
62 }; |
62 }; |
63 |
63 |
64 /*****************************************************************************/ |
64 /*****************************************************************************/ |
65 |
65 |
66 void ec_fsm_pdo_entry_init(ec_fsm_pdo_entry_t *, ec_fsm_coe_t *); |
66 void ec_fsm_pdo_entry_init(ec_fsm_pdo_entry_t *, ec_fsm_coe_t *); |