EtherCAT sync manager.
More...
Go to the source code of this file.
EtherCAT sync manager.
Definition in file sync.h.
◆ ec_sync_init()
Constructor.
- Parameters
-
| sync | EtherCAT sync manager. |
| slave | EtherCAT slave. |
Definition at line 38 of file sync.c.
◆ ec_sync_init_copy()
Copy constructor.
- Parameters
-
| sync | EtherCAT sync manager. |
| other | Sync manager to copy from. |
Definition at line 55 of file sync.c.
◆ ec_sync_clear()
Destructor.
- Parameters
-
| sync | EtherCAT sync manager. |
Definition at line 73 of file sync.c.
◆ ec_sync_page()
| void ec_sync_page |
( |
const ec_sync_t * | sync, |
|
|
uint8_t | sync_index, |
|
|
uint16_t | data_size, |
|
|
const ec_sync_config_t * | sync_config, |
|
|
uint8_t | pdo_xfer, |
|
|
uint8_t * | data ) |
Initializes a sync manager configuration page.
The referenced memory (data) must be at least EC_SYNC_SIZE bytes.
- Parameters
-
| sync | Sync manager. |
| sync_index | Index of the sync manager. |
| data_size | Data size. |
| sync_config | Configuration. |
| pdo_xfer | Non-zero, if PDOs will be transferred via this sync manager. |
| data |
Configuration memory.
|
Definition at line 86 of file sync.c.
◆ ec_sync_add_pdo()
Adds a PDO to the list of known mapped PDOs.
- Returns
- 0 on success, else < 0
- Parameters
-
| sync | EtherCAT sync manager. |
| pdo | PDO to map. |
Definition at line 145 of file sync.c.
◆ ec_sync_default_direction()
Determines the default direction from the control register.
- Returns
- Direction.
- Parameters
-
| sync | EtherCAT sync manager. |
Definition at line 159 of file sync.c.