48 #define EC_IO_TIMEOUT 500 |
48 #define EC_IO_TIMEOUT 500 |
49 |
49 |
50 /** Number of state machine retries on datagram timeout. */ |
50 /** Number of state machine retries on datagram timeout. */ |
51 #define EC_FSM_RETRIES 3 |
51 #define EC_FSM_RETRIES 3 |
52 |
52 |
53 /** Seconds to wait before fetching Sdo dictionary |
53 /** Seconds to wait before fetching SDO dictionary |
54 after slave entered PREOP state. */ |
54 after slave entered PREOP state. */ |
55 #define EC_WAIT_SDO_DICT 3 |
55 #define EC_WAIT_SDO_DICT 3 |
56 |
56 |
57 /** Minimum size of a buffer used with ec_state_string(). */ |
57 /** Minimum size of a buffer used with ec_state_string(). */ |
58 #define EC_STATE_STRING_SIZE 32 |
58 #define EC_STATE_STRING_SIZE 32 |
120 } ec_slave_state_t; |
120 } ec_slave_state_t; |
121 |
121 |
122 /** Supported mailbox protocols. |
122 /** Supported mailbox protocols. |
123 */ |
123 */ |
124 enum { |
124 enum { |
125 EC_MBOX_AOE = 0x01, /**< ADS-over-EtherCAT */ |
125 EC_MBOX_AOE = 0x01, /**< ADS over EtherCAT */ |
126 EC_MBOX_EOE = 0x02, /**< Ethernet-over-EtherCAT */ |
126 EC_MBOX_EOE = 0x02, /**< Ethernet over EtherCAT */ |
127 EC_MBOX_COE = 0x04, /**< CANopen-over-EtherCAT */ |
127 EC_MBOX_COE = 0x04, /**< CANopen over EtherCAT */ |
128 EC_MBOX_FOE = 0x08, /**< File-Access-over-EtherCAT */ |
128 EC_MBOX_FOE = 0x08, /**< File-Access over EtherCAT */ |
129 EC_MBOX_SOE = 0x10, /**< Servo-Profile-over-EtherCAT */ |
129 EC_MBOX_SOE = 0x10, /**< Servo-Profile over EtherCAT */ |
130 EC_MBOX_VOE = 0x20 /**< Vendor specific */ |
130 EC_MBOX_VOE = 0x20 /**< Vendor specific */ |
131 }; |
131 }; |
132 |
132 |
133 /** Slave information interface CANopen-over-EtherCAT details flags. |
133 /** Slave information interface CANopen over EtherCAT details flags. |
134 */ |
134 */ |
135 typedef struct { |
135 typedef struct { |
136 uint8_t enable_sdo : 1; /**< Enable Sdo access. */ |
136 uint8_t enable_sdo : 1; /**< Enable SDO access. */ |
137 uint8_t enable_sdo_info : 1; /**< SDO information service available. */ |
137 uint8_t enable_sdo_info : 1; /**< SDO information service available. */ |
138 uint8_t enable_pdo_assign : 1; /**< Pdo mapping configurable. */ |
138 uint8_t enable_pdo_assign : 1; /**< PDO mapping configurable. */ |
139 uint8_t enable_pdo_configuration : 1; /**< Pdo configuration possible. */ |
139 uint8_t enable_pdo_configuration : 1; /**< PDO configuration possible. */ |
140 uint8_t enable_upload_at_startup : 1; /**< ?. */ |
140 uint8_t enable_upload_at_startup : 1; /**< ?. */ |
141 uint8_t enable_sdo_complete_access : 1; /**< Complete access possible. */ |
141 uint8_t enable_sdo_complete_access : 1; /**< Complete access possible. */ |
142 } ec_sii_coe_details_t; |
142 } ec_sii_coe_details_t; |
143 |
143 |
144 /** Slave information interface general flags. |
144 /** Slave information interface general flags. |