- optional preinit function per device to allow dynamic configuration (i.e. PDO mapping count)
- FSOE parameters per device
This commit is contained in:
@@ -70,11 +70,16 @@ do { \
|
||||
|
||||
#define LCEC_IDN(type, set, block) (type | ((set & 0x07) << 12) | (block & 0x0fff))
|
||||
|
||||
#define LCEC_FSOE_MSG_LEN 6
|
||||
#define LCEC_FSOE_CMD_LEN 1
|
||||
#define LCEC_FSOE_CRC_LEN 2
|
||||
#define LCEC_FSOE_CONNID_LEN 2
|
||||
|
||||
#define LCEC_FSOE_SIZE(ch_count, data_len) (LCEC_FSOE_CMD_LEN + ch_count * (data_len + LCEC_FSOE_CRC_LEN) + LCEC_FSOE_CONNID_LEN)
|
||||
|
||||
struct lcec_master;
|
||||
struct lcec_slave;
|
||||
|
||||
typedef int (*lcec_slave_preinit_t) (struct lcec_slave *slave);
|
||||
typedef int (*lcec_slave_init_t) (int comp_id, struct lcec_slave *slave, ec_pdo_entry_reg_t *pdo_entry_regs);
|
||||
typedef void (*lcec_slave_cleanup_t) (struct lcec_slave *slave);
|
||||
typedef void (*lcec_slave_rw_t) (struct lcec_slave *slave, long period);
|
||||
@@ -183,6 +188,7 @@ typedef struct lcec_slave {
|
||||
ec_slave_config_state_t state;
|
||||
lcec_slave_dc_t *dc_conf;
|
||||
lcec_slave_watchdog_t *wd_conf;
|
||||
lcec_slave_preinit_t proc_preinit;
|
||||
lcec_slave_init_t proc_init;
|
||||
lcec_slave_cleanup_t proc_cleanup;
|
||||
lcec_slave_rw_t proc_read;
|
||||
@@ -195,6 +201,7 @@ typedef struct lcec_slave {
|
||||
lcec_slave_sdoconf_t *sdo_config;
|
||||
lcec_slave_idnconf_t *idn_config;
|
||||
lcec_slave_modparam_t *modparams;
|
||||
LCEC_CONF_FSOE_T fsoeConf;
|
||||
unsigned int *fsoe_slave_offset;
|
||||
unsigned int *fsoe_master_offset;
|
||||
} lcec_slave_t;
|
||||
|
||||
Reference in New Issue
Block a user