36 #ifndef __EC_MASTER_GLOBALS_H__ 37 #define __EC_MASTER_GLOBALS_H__ 39 #include "../globals.h" 40 #include "../include/ecrt.h" 47 #define EC_IO_TIMEOUT 500 50 #define EC_SDO_INJECTION_TIMEOUT 10000 56 #define EC_BYTE_TRANSMISSION_TIME_NS 80 59 #define EC_FSM_RETRIES 3 62 #define EC_SKIP_SDO_DICT 1 65 #define EC_STATE_STRING_SIZE 32 68 #define EC_MAX_SII_SIZE 4096 71 #define EC_RATE_COUNT 3 78 #define EC_FRAME_HEADER_SIZE 2 81 #define EC_DATAGRAM_HEADER_SIZE 10 84 #define EC_DATAGRAM_FOOTER_SIZE 2 90 #ifdef DEBUG_DATAGRAM_OVERFLOW 93 #define EC_MAX_DATA_SIZE (128) 95 #define EC_MAX_DATA_SIZE (ETH_DATA_LEN - EC_FRAME_HEADER_SIZE \ 96 - EC_DATAGRAM_HEADER_SIZE - EC_DATAGRAM_FOOTER_SIZE) 97 #endif // DEBUG_DATAGRAM_OVERFLOW 100 #define EC_MBOX_HEADER_SIZE 6 103 #define EC_COE_HEADER_SIZE 2 106 #define EC_MBG_SLAVE_ADDR_OFFSET 1000 109 #define EC_FIRST_SII_CATEGORY_OFFSET 0x40 112 #define EC_ALIAS_SII_OFFSET 0x04 115 #define EC_VENDOR_SII_OFFSET 0x08 118 #define EC_PRODUCT_SII_OFFSET 0x0A 121 #define EC_REVISION_SII_OFFSET 0x0C 124 #define EC_SERIAL_SII_OFFSET 0x0E 127 #define EC_SYNC_PAGE_SIZE 8 130 #define EC_MAX_FMMUS 16 133 #define EC_FMMU_PAGE_SIZE 16 136 #define EC_SYNC_SIGNAL_COUNT 2 142 #define EC_DATAGRAM_NAME_SIZE 20 148 #define EC_MAX_HOSTNAME_SIZE 32 155 #define EC_SLAVE_STATE_MASK 0x0F 252 #define EC_INFO(fmt, args...) \ 253 printk(KERN_INFO "EtherCAT: " fmt, ##args) 262 #define EC_ERR(fmt, args...) \ 263 printk(KERN_ERR "EtherCAT ERROR: " fmt, ##args) 272 #define EC_WARN(fmt, args...) \ 273 printk(KERN_WARNING "EtherCAT WARNING: " fmt, ##args) 282 #define EC_DBG(fmt, args...) \ 283 printk(KERN_DEBUG "EtherCAT DEBUG: " fmt, ##args) 289 #define EC_ABS(X) ((X) >= 0 ? (X) : -(X)) 327 EC_INT_REQUEST_QUEUED,
329 EC_INT_REQUEST_SUCCESS,
330 EC_INT_REQUEST_FAILURE
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
?.
Servo-Profile over EtherCAT.
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.
size_t ec_mac_print(const uint8_t *, char *)
Print a MAC address to a buffer.
SAFEOP (mailbox communication and input update)
ec_internal_request_state_t
Generic request state.
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)
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.
File-Access over EtherCAT.
uint8_t enable_pdo_assign
PDO mapping configurable.