27 #ifndef __EC_MASTER_GLOBALS_H__ 28 #define __EC_MASTER_GLOBALS_H__ 30 #include "../globals.h" 31 #include "../include/ecrt.h" 38 #define EC_IO_TIMEOUT 500 44 #define EC_BYTE_TRANSMISSION_TIME_NS 80 47 #define EC_FSM_RETRIES 3 51 #define EC_WAIT_SDO_DICT 3 54 #define EC_STATE_STRING_SIZE 32 57 #define EC_MAX_SII_SIZE 4096 60 #define EC_RATE_COUNT 3 67 #define EC_FRAME_HEADER_SIZE 2 70 #define EC_DATAGRAM_HEADER_SIZE 10 73 #define EC_DATAGRAM_FOOTER_SIZE 2 79 #define EC_MAX_DATA_SIZE (ETH_DATA_LEN - EC_FRAME_HEADER_SIZE \ 80 - EC_DATAGRAM_HEADER_SIZE - EC_DATAGRAM_FOOTER_SIZE) 83 #define EC_MBOX_HEADER_SIZE 6 86 #define EC_FIRST_SII_CATEGORY_OFFSET 0x40 89 #define EC_SYNC_PAGE_SIZE 8 92 #define EC_MAX_FMMUS 16 95 #define EC_FMMU_PAGE_SIZE 16 98 #define EC_SYNC_SIGNAL_COUNT 2 104 #define EC_DATAGRAM_NAME_SIZE 20 111 #define EC_SLAVE_STATE_MASK 0x0F 205 #define EC_INFO(fmt, args...) \ 206 printk(KERN_INFO "EtherCAT: " fmt, ##args) 215 #define EC_ERR(fmt, args...) \ 216 printk(KERN_ERR "EtherCAT ERROR: " fmt, ##args) 225 #define EC_WARN(fmt, args...) \ 226 printk(KERN_WARNING "EtherCAT WARNING: " fmt, ##args) 235 #define EC_DBG(fmt, args...) \ 236 printk(KERN_DEBUG "EtherCAT DEBUG: " fmt, ##args) 242 #define EC_ABS(X) ((X) >= 0 ? (X) : -(X)) 280 EC_INT_REQUEST_QUEUED,
282 EC_INT_REQUEST_SUCCESS,
283 EC_INT_REQUEST_FAILURE
Servo-Profile over EtherCAT.
Slave information interface general flags.
int ec_mac_is_zero(const uint8_t *)
void ec_print_data_diff(const uint8_t *, const uint8_t *, size_t)
Outputs frame contents and differences for debugging purposes.
uint8_t enable_upload_at_startup
?.
int32_t shift_time
Shift time [ns].
uint8_t enable_not_lrw
Slave does not support LRW.
OP (mailbox communication and input/output update)
size_t ec_state_string(uint8_t, char *, uint8_t)
Prints slave states in clear text.
uint8_t enable_sdo
Enable SDO access.
Bootstrap state (mailbox communication, firmware update)
uint32_t cycle_time
Cycle time [ns].
Acknowledge/Error bit (no actual state)
ec_master_t * ecrt_request_master_err(unsigned int)
Request a master.
const char * message
Message belonging to code.
const char * ec_device_names[2]
Device names.
SAFEOP (mailbox communication and input update)
ec_internal_request_state_t
Generic request state.
File-Access over EtherCAT.
Slave information interface CANopen over EtherCAT details flags.
uint8_t enable_sdo_info
SDO information service available.
uint8_t enable_sdo_complete_access
Complete access possible.
ec_device_index_t
Master devices.
ec_slave_dc_range_t
EtherCAT slave distributed clocks range.
ec_slave_state_t
State of an EtherCAT slave.
void ec_print_data(const uint8_t *, size_t)
Outputs frame contents for debugging purposes.
char * ec_master_version_str
Version string.
INIT state (no mailbox communication, no IO)
ssize_t ec_mac_print(const uint8_t *, char *)
Print a MAC address to a buffer.
EtherCAT slave sync signal configuration.
unsigned int ec_master_count(void)
Get the number of masters.
ec_request_state_t
Request state.
PREOP state (mailbox communication, no IO)
const ec_request_state_t ec_request_state_translation_table[]
Global request state type translation table.
uint8_t enable_pdo_configuration
PDO configuration possible.
uint8_t enable_pdo_assign
PDO mapping configurable.