37 #ifndef __EC_SLAVE_CONFIG_H__ 38 #define __EC_SLAVE_CONFIG_H__ 40 #include <linux/list.h> 61 #define EC_CONFIG_INFO(sc, fmt, args...) \ 62 printk(KERN_INFO "EtherCAT %u %u:%u: " fmt, sc->master->index, \ 63 sc->alias, sc->position, ##args) 75 #define EC_CONFIG_ERR(sc, fmt, args...) \ 76 printk(KERN_ERR "EtherCAT ERROR %u %u:%u: " fmt, sc->master->index, \ 77 sc->alias, sc->position, ##args) 89 #define EC_CONFIG_WARN(sc, fmt, args...) \ 90 printk(KERN_WARNING "EtherCAT WARNING %u %u:%u: " fmt, \ 91 sc->master->index, sc->alias, sc->position, ##args) 106 #define EC_CONFIG_DBG(sc, level, fmt, args...) \ 108 if (sc->master->debug_level >= level) { \ 109 printk(KERN_DEBUG "EtherCAT DEBUG %u %u:%u: " fmt, \ 110 sc->master->index, sc->alias, sc->position, ##args); \ 158 uint16_t, uint32_t, uint32_t);
void ec_slave_config_init(ec_slave_config_t *, ec_master_t *, uint16_t, uint16_t, uint32_t, uint32_t)
Slave configuration constructor.
struct list_head sdo_configs
List of SDO configurations.
ec_reg_request_t * ec_slave_config_find_reg_request(ec_slave_config_t *, unsigned int)
Finds a register handler via its position in the list.
struct list_head foe_requests
List of FoE requests.
void ec_slave_config_load_default_sync_config(ec_slave_config_t *)
Loads the default PDO assignment from the slave object.
unsigned int ec_slave_config_idn_count(const ec_slave_config_t *)
Get the number of IDN configurations.
void ec_slave_config_expire_disconnected_requests(ec_slave_config_t *)
Expires any requests that have been started on a detached slave.
EtherCAT slave structure.
unsigned int ec_slave_config_sdo_count(const ec_slave_config_t *)
Get the number of SDO configurations.
uint8_t used_fmmus
Number of FMMUs used.
uint32_t product_code
Slave product code.
uint16_t position
Index after alias.
struct list_head list
List item.
ec_master_t * master
Master owning the slave configuration.
EtherCAT CoE emergency ring buffer structure.
uint16_t alias
Slave alias.
EtherCAT CoE emergency ring buffer.
#define EC_MAX_FMMUS
Maximum number of FMMUs per slave.
Global definitions and macros.
ec_fmmu_config_t fmmu_configs[EC_MAX_FMMUS]
FMMU configurations.
ec_sync_signal_t dc_sync[EC_SYNC_SIGNAL_COUNT]
DC sync signals.
ec_voe_handler_t * ec_slave_config_find_voe_handler(ec_slave_config_t *, unsigned int)
Finds a VoE handler via its position in the list.
ec_foe_request_t * ec_slave_config_find_foe_request(ec_slave_config_t *, unsigned int)
Finds an FoE handler via its position in the list.
ec_sync_config_t sync_configs[EC_MAX_SYNC_MANAGERS]
Sync manager configurations.
struct list_head reg_requests
List of register requests.
struct list_head sdo_requests
List of SDO requests.
struct list_head voe_handlers
List of VoE handlers.
const ec_sdo_request_t * ec_slave_config_get_sdo_by_pos_const(const ec_slave_config_t *, unsigned int)
Finds an SDO configuration via its position in the list.
uint16_t dc_assign_activate
Vendor-specific AssignActivate word.
uint16_t watchdog_intervals
Process data watchdog intervals (see spec.
Vendor specific over EtherCAT handler.
ec_foe_request_t * ecrt_slave_config_create_foe_request_err(ec_slave_config_t *, size_t)
Same as ecrt_slave_config_create_foe_request(), but with ERR_PTR() return value.
EtherCAT FMMU configuration structure.
ec_slave_t * slave
Slave pointer.
uint16_t watchdog_divider
Watchdog divider as a number of 40ns intervals (see spec.
ec_voe_handler_t * ecrt_slave_config_create_voe_handler_err(ec_slave_config_t *, size_t)
Same as ecrt_slave_config_create_voe_handler(), but with ERR_PTR() return value.
ec_reg_request_t * ecrt_slave_config_create_reg_request_err(ec_slave_config_t *, size_t)
Same as ecrt_slave_config_create_reg_request(), but with ERR_PTR() return value.
void ec_slave_config_clear(ec_slave_config_t *)
Slave configuration destructor.
struct list_head soe_configs
List of SoE configurations.
uint8_t allow_overlapping_pdos
Allow input PDOs use the same frame space as output PDOs.
int ec_slave_config_attach(ec_slave_config_t *)
Attaches the configuration to the addressed slave object.
ec_coe_emerg_ring_t emerg_ring
CoE emergency ring buffer.
ec_sdo_request_t * ecrt_slave_config_create_sdo_request_err(ec_slave_config_t *, uint16_t, uint8_t, uint8_t, size_t)
Same as ecrt_slave_config_create_sdo_request(), but with ERR_PTR() return value.
Sync manager configuration.
EtherCAT slave sync signal configuration.
uint32_t vendor_id
Slave vendor ID.
ec_sdo_request_t * ec_slave_config_find_sdo_request(ec_slave_config_t *, unsigned int)
Finds a CoE handler via its position in the list.
const ec_soe_request_t * ec_slave_config_get_idn_by_pos_const(const ec_slave_config_t *, unsigned int)
Finds an IDN configuration via its position in the list.
void ec_slave_config_detach(ec_slave_config_t *)
Detaches the configuration from a slave object.
EtherCAT slave configuration.
#define EC_MAX_SYNC_MANAGERS
Maximum number of sync managers per slave.
#define EC_SYNC_SIGNAL_COUNT
Number of DC sync signals.
Sercos-over-EtherCAT request.