Renamed ec_sii_sync_t to ec_sync_t.
This commit is contained in:
parent
667e0f3e13
commit
762b0d2cf8
|
|
@ -54,7 +54,7 @@ typedef struct
|
|||
{
|
||||
struct list_head list; /**< list item */
|
||||
ec_slave_t *slave; /**< slave */
|
||||
const ec_sii_sync_t *sync; /**< sync manager */
|
||||
const ec_sync_t *sync; /**< sync manager */
|
||||
off_t sync_offset; /**< pdo offset */
|
||||
void **data_ptr; /**< pointer to process data pointer(s) */
|
||||
}
|
||||
|
|
@ -196,7 +196,7 @@ int ec_domain_reg_pdo_entry(ec_domain_t *domain, /**< EtherCAT domain */
|
|||
)
|
||||
{
|
||||
ec_data_reg_t *data_reg;
|
||||
const ec_sii_sync_t *sync;
|
||||
const ec_sync_t *sync;
|
||||
const ec_pdo_t *other_pdo;
|
||||
const ec_pdo_entry_t *other_entry;
|
||||
unsigned int bit_offset, byte_offset;
|
||||
|
|
@ -265,7 +265,7 @@ int ec_domain_reg_pdo_range(ec_domain_t *domain, /**< EtherCAT domain */
|
|||
)
|
||||
{
|
||||
ec_data_reg_t *data_reg;
|
||||
ec_sii_sync_t *sync;
|
||||
ec_sync_t *sync;
|
||||
uint16_t sync_length;
|
||||
|
||||
if (!(sync = ec_slave_get_pdo_sync(slave, dir))) {
|
||||
|
|
|
|||
|
|
@ -482,12 +482,12 @@ int ec_slave_fetch_sii_syncs(
|
|||
)
|
||||
{
|
||||
unsigned int i;
|
||||
ec_sii_sync_t *sync;
|
||||
ec_sync_t *sync;
|
||||
|
||||
// sync manager struct is 4 words long
|
||||
slave->sii_sync_count = word_count / 4;
|
||||
|
||||
if (!(slave->sii_syncs = kmalloc(sizeof(ec_sii_sync_t) *
|
||||
if (!(slave->sii_syncs = kmalloc(sizeof(ec_sync_t) *
|
||||
slave->sii_sync_count, GFP_ATOMIC))) {
|
||||
EC_ERR("Failed to allocate Sync-Manager memory.\n");
|
||||
return -1;
|
||||
|
|
@ -608,7 +608,7 @@ char *ec_slave_sii_string(
|
|||
|
||||
int ec_slave_prepare_fmmu(ec_slave_t *slave, /**< EtherCAT slave */
|
||||
const ec_domain_t *domain, /**< domain */
|
||||
const ec_sii_sync_t *sync /**< sync manager */
|
||||
const ec_sync_t *sync /**< sync manager */
|
||||
)
|
||||
{
|
||||
unsigned int i;
|
||||
|
|
@ -654,7 +654,7 @@ size_t ec_slave_info(const ec_slave_t *slave, /**< EtherCAT slave */
|
|||
)
|
||||
{
|
||||
off_t off = 0;
|
||||
ec_sii_sync_t *sync;
|
||||
ec_sync_t *sync;
|
||||
ec_pdo_t *pdo;
|
||||
ec_pdo_entry_t *pdo_entry;
|
||||
int first, i;
|
||||
|
|
@ -1067,7 +1067,7 @@ ssize_t ec_store_slave_attribute(struct kobject *kobj, /**< slave's kobject */
|
|||
|
||||
uint16_t ec_slave_calc_sync_size(const ec_slave_t *slave,
|
||||
/**< EtherCAT slave */
|
||||
const ec_sii_sync_t *sync
|
||||
const ec_sync_t *sync
|
||||
/**< sync manager */
|
||||
)
|
||||
{
|
||||
|
|
@ -1100,7 +1100,7 @@ uint16_t ec_slave_calc_sync_size(const ec_slave_t *slave,
|
|||
/**
|
||||
*/
|
||||
|
||||
ec_sii_sync_t *ec_slave_get_pdo_sync(
|
||||
ec_sync_t *ec_slave_get_pdo_sync(
|
||||
ec_slave_t *slave, /**< EtherCAT slave */
|
||||
ec_direction_t dir /**< input or output */
|
||||
)
|
||||
|
|
@ -1133,7 +1133,7 @@ ec_sii_sync_t *ec_slave_get_pdo_sync(
|
|||
*/
|
||||
|
||||
void ec_slave_sync_config(const ec_slave_t *slave, /**< EtherCAT slave */
|
||||
const ec_sii_sync_t *sync, /**< sync manager */
|
||||
const ec_sync_t *sync, /**< sync manager */
|
||||
uint8_t *data /**> configuration memory */
|
||||
)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -72,6 +72,11 @@ typedef enum
|
|||
}
|
||||
ec_slave_state_t;
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/**
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
EC_SLAVE_OFFLINE,
|
||||
EC_SLAVE_ONLINE
|
||||
|
|
@ -97,7 +102,7 @@ enum
|
|||
/*****************************************************************************/
|
||||
|
||||
/**
|
||||
Sync manager configuration (EEPROM).
|
||||
Sync manager.
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
|
|
@ -107,11 +112,12 @@ typedef struct
|
|||
uint16_t length; /**< data length in bytes */
|
||||
uint8_t control_register; /**< control register value */
|
||||
uint8_t enable; /**< enable bit */
|
||||
|
||||
uint16_t est_length; /**< Estimated length. This is no field of the SII,
|
||||
but it is used to calculate the length via
|
||||
PDO ranges */
|
||||
}
|
||||
ec_sii_sync_t;
|
||||
ec_sync_t;
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
|
@ -169,7 +175,7 @@ typedef struct
|
|||
{
|
||||
unsigned int index; /**< FMMU index */
|
||||
const ec_domain_t *domain; /**< domain */
|
||||
const ec_sii_sync_t *sync; /**< sync manager */
|
||||
const ec_sync_t *sync; /**< sync manager */
|
||||
uint32_t logical_start_address; /**< logical start address */
|
||||
}
|
||||
ec_fmmu_t;
|
||||
|
|
@ -228,7 +234,7 @@ struct ec_slave
|
|||
uint8_t sii_physical_layer[4]; /**< port media */
|
||||
char **sii_strings; /**< strings in EEPROM categories */
|
||||
unsigned int sii_string_count; /**< number of EEPROM strings */
|
||||
ec_sii_sync_t *sii_syncs; /**< EEPROM SYNC MANAGER categories */
|
||||
ec_sync_t *sii_syncs; /**< EEPROM SYNC MANAGER categories */
|
||||
unsigned int sii_sync_count; /**< number of sync managers in EEPROM */
|
||||
struct list_head sii_pdos; /**< EEPROM [RT]XPDO categories */
|
||||
char *sii_group; /**< slave group acc. to EEPROM */
|
||||
|
|
@ -256,7 +262,7 @@ void ec_slave_destroy(ec_slave_t *);
|
|||
void ec_slave_reset(ec_slave_t *);
|
||||
|
||||
int ec_slave_prepare_fmmu(ec_slave_t *, const ec_domain_t *,
|
||||
const ec_sii_sync_t *);
|
||||
const ec_sync_t *);
|
||||
|
||||
void ec_slave_request_state(ec_slave_t *, ec_slave_state_t);
|
||||
void ec_slave_set_state(ec_slave_t *, ec_slave_state_t);
|
||||
|
|
@ -270,11 +276,10 @@ int ec_slave_fetch_sii_pdos(ec_slave_t *, const uint8_t *, size_t,
|
|||
ec_pdo_type_t);
|
||||
|
||||
// misc.
|
||||
ec_sii_sync_t *ec_slave_get_pdo_sync(ec_slave_t *, ec_direction_t);
|
||||
void ec_slave_sync_config(const ec_slave_t *, const ec_sii_sync_t *,
|
||||
uint8_t *);
|
||||
ec_sync_t *ec_slave_get_pdo_sync(ec_slave_t *, ec_direction_t);
|
||||
void ec_slave_sync_config(const ec_slave_t *, const ec_sync_t *, uint8_t *);
|
||||
void ec_slave_fmmu_config(const ec_slave_t *, const ec_fmmu_t *, uint8_t *);
|
||||
uint16_t ec_slave_calc_sync_size(const ec_slave_t *, const ec_sii_sync_t *);
|
||||
uint16_t ec_slave_calc_sync_size(const ec_slave_t *, const ec_sync_t *);
|
||||
|
||||
int ec_slave_is_coupler(const ec_slave_t *);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue