libethercat - an embeddable realtime EtherCAT-master library
Communicate with EtherCAT slaves attached to a Network interface.
|
Data Structures | |
struct | ec_eeprom_cat_general |
struct | ec_eeprom_cat_pdo_entry |
struct | ec_eeprom_cat_pdo |
struct | ec_eeprom_cat_sm |
eeprom sync manager settings More... | |
struct | ec_eeprom_cat_dc |
eeprom distributed clocks settings More... | |
struct | ec_eeprom_cat_fmmu |
eeporm fmmu description More... | |
struct | eeprom_info |
Typedefs | |
typedef struct PACKED ec_eeprom_cat_general | ec_eeprom_cat_general_t |
typedef struct PACKED ec_eeprom_cat_pdo_entry | ec_eeprom_cat_pdo_entry_t |
typedef struct ec_eeprom_cat_pdo | ec_eeprom_cat_pdo_t |
typedef struct PACKED ec_eeprom_cat_sm | ec_eeprom_cat_sm_t |
eeprom sync manager settings | |
typedef struct PACKED ec_eeprom_cat_dc | ec_eeprom_cat_dc_t |
eeprom distributed clocks settings | |
typedef struct PACKED ec_eeprom_cat_fmmu | ec_eeprom_cat_fmmu_t |
eeporm fmmu description | |
typedef struct eeprom_info | eeprom_info_t |
Functions | |
TAILQ_HEAD (ec_eeprom_cat_pdo_queue, ec_eeprom_cat_pdo) | |
head to PDO queue | |
int | ec_eeprom_to_pdi (struct ec *pec, osal_uint16_t slave) |
Set eeprom control to pdi. | |
int | ec_eeprom_to_ec (struct ec *pec, osal_uint16_t slave) |
Set eeprom control to ec. | |
int | ec_eepromread (struct ec *pec, osal_uint16_t slave, osal_uint32_t eepadr, osal_uint32_t *data) |
Read 32-bit word of eeprom. | |
int | ec_eepromwrite (struct ec *pec, osal_uint16_t slave, osal_uint32_t eepadr, osal_uint16_t *data) |
Write 32-bit word to eeprom. | |
int | ec_eepromread_len (struct ec *pec, osal_uint16_t slave, osal_uint32_t eepadr, osal_uint8_t *buf, osal_size_t buflen) |
Read a burst of eeprom data. | |
int | ec_eepromwrite_len (struct ec *pec, osal_uint16_t slave, osal_uint32_t eepadr, const osal_uint8_t *buf, osal_size_t buflen) |
Write a burst of eeprom data. | |
void | ec_eeprom_dump (struct ec *pec, osal_uint16_t slave) |
Read out whole eeprom and categories and store in EtherCAT master structure. | |
This modules contains EtherCAT SII functions for EEPROM access.
void ec_eeprom_dump | ( | struct ec * | pec, |
osal_uint16_t | slave | ||
) |
Read out whole eeprom and categories and store in EtherCAT master structure.
[in] | pec | Pointer to EtherCAT master structure, which you got from ec_open. |
[in] | slave | Number of EtherCAT slave. this depends on the physical order of the EtherCAT slaves (usually the n'th slave attached). |
EC_OK | On success. |
EC_ERROR_EEPROM_READ_ERROR | Read error on EEPROM. |
EC_ERROR_EEPROM_WRITE_IN_PROGRESS | Write on EEPROM is currently in progress. |
EC_ERROR_EEPROM_WRITE_ENABLE | EEPROM write is enabled. |
EC_ERROR_EEPROM_CHECKSUM | EEPROM checksum is wrong. |
int ec_eeprom_to_ec | ( | struct ec * | pec, |
osal_uint16_t | slave | ||
) |
Set eeprom control to ec.
[in] | pec | Pointer to EtherCAT master structure, which you got from ec_open. |
[in] | slave | Number of EtherCAT slave. this depends on the physical order of the EtherCAT slaves (usually the n'th slave attached). |
EC_OK | On success. |
EC_ERROR_EEPROM_CONTROL_TO_EC | Error setting control to EC. |
int ec_eeprom_to_pdi | ( | struct ec * | pec, |
osal_uint16_t | slave | ||
) |
Set eeprom control to pdi.
[in] | pec | Pointer to EtherCAT master structure, which you got from ec_open. |
[in] | slave | Number of EtherCAT slave. this depends on the physical order of the EtherCAT slaves (usually the n'th slave attached). |
EC_OK | On success. |
EC_ERROR_EEPROM_CONTROL_TO_PDI | Error setting control to PDI. |
int ec_eepromread | ( | struct ec * | pec, |
osal_uint16_t | slave, | ||
osal_uint32_t | eepadr, | ||
osal_uint32_t * | data | ||
) |
Read 32-bit word of eeprom.
[in] | pec | Pointer to EtherCAT master structure, which you got from ec_open. |
[in] | slave | Number of EtherCAT slave. this depends on the physical order of the EtherCAT slaves (usually the n'th slave attached). |
[in] | eepadr | Address in eeprom where to read data. |
[out] | data | Returns read 32-bit data value. |
EC_OK | On success. |
EC_ERROR_EEPROM_READ_ERROR | Read error on EEPROM. |
EC_ERROR_EEPROM_WRITE_IN_PROGRESS | Write on EEPROM is currently in progress. |
EC_ERROR_EEPROM_WRITE_ENABLE | EEPROM write is enabled. |
EC_ERROR_EEPROM_CHECKSUM | EEPROM checksum is wrong. |
int ec_eepromread_len | ( | struct ec * | pec, |
osal_uint16_t | slave, | ||
osal_uint32_t | eepadr, | ||
osal_uint8_t * | buf, | ||
osal_size_t | buflen | ||
) |
Read a burst of eeprom data.
[in] | pec | Pointer to EtherCAT master structure, which you got from ec_open. |
[in] | slave | Number of EtherCAT slave. this depends on the physical order of the EtherCAT slaves (usually the n'th slave attached). |
[in] | eepadr | Address in eeprom from where to read the data. |
[out] | buf | Data buffer where the read data will be copied. |
[in] | buflen | Length of data buffer provided by user. |
EC_OK | On success. |
EC_ERROR_EEPROM_READ_ERROR | Read error on EEPROM. |
EC_ERROR_EEPROM_WRITE_IN_PROGRESS | Write on EEPROM is currently in progress. |
EC_ERROR_EEPROM_WRITE_ENABLE | EEPROM write is enabled. |
EC_ERROR_EEPROM_CHECKSUM | EEPROM checksum is wrong. |
int ec_eepromwrite | ( | struct ec * | pec, |
osal_uint16_t | slave, | ||
osal_uint32_t | eepadr, | ||
osal_uint16_t * | data | ||
) |
Write 32-bit word to eeprom.
[in] | pec | Pointer to EtherCAT master structure, which you got from ec_open. |
[in] | slave | Number of EtherCAT slave. this depends on the physical order of the EtherCAT slaves (usually the n'th slave attached). |
[in] | eepadr | Address in eeprom where to write data. |
[out] | data | 32-bit data value which will be written. |
EC_OK | On success. |
EC_ERROR_EEPROM_WRITE_ERROR | Write error on EEPROM. |
EC_ERROR_EEPROM_WRITE_IN_PROGRESS | Write on EEPROM is currently in progress. |
EC_ERROR_EEPROM_WRITE_ENABLE | EEPROM write is enabled. |
EC_ERROR_EEPROM_CHECKSUM | EEPROM checksum is wrong. |
int ec_eepromwrite_len | ( | struct ec * | pec, |
osal_uint16_t | slave, | ||
osal_uint32_t | eepadr, | ||
const osal_uint8_t * | buf, | ||
osal_size_t | buflen | ||
) |
Write a burst of eeprom data.
[in] | pec | Pointer to EtherCAT master structure, which you got from ec_open. |
[in] | slave | Number of EtherCAT slave. this depends on the physical order of the EtherCAT slaves (usually the n'th slave attached). |
[in] | eepadr | Address in eeprom from where to read the data. |
[in] | buf | Data buffer with provided data to write to EtherCAT slave's eeprom. |
[in] | buflen | Length of data buffer provided by user. |
EC_OK | On success. |
EC_ERROR_EEPROM_WRITE_ERROR | Write error on EEPROM. |
EC_ERROR_EEPROM_WRITE_IN_PROGRESS | Write on EEPROM is currently in progress. |
EC_ERROR_EEPROM_WRITE_ENABLE | EEPROM write is enabled. |
EC_ERROR_EEPROM_CHECKSUM | EEPROM checksum is wrong. |