57 * Sync manager. |
57 * Sync manager. |
58 */ |
58 */ |
59 |
59 |
60 typedef struct |
60 typedef struct |
61 { |
61 { |
62 const ec_slave_t *slave; /**< slave, the sync manager belongs to */ |
62 ec_slave_t *slave; /**< slave, the sync manager belongs to */ |
63 unsigned int index; /**< sync manager index */ |
63 unsigned int index; /**< sync manager index */ |
64 uint16_t physical_start_address; /**< physical start address */ |
64 uint16_t physical_start_address; /**< physical start address */ |
65 uint16_t length; /**< data length in bytes */ |
65 uint16_t length; /**< data length in bytes */ |
66 uint8_t control_register; /**< control register value */ |
66 uint8_t control_register; /**< control register value */ |
67 uint8_t enable; /**< enable bit */ |
67 uint8_t enable; /**< enable bit */ |
68 |
68 |
69 uint16_t est_length; /**< Estimated length. This is no field of the SII, |
69 uint16_t est_length; /**< used to calculate the length via PDO ranges */ |
70 but it is used to calculate the length via |
70 struct list_head pdos; /**< list of mapped PDOs */ |
71 PDO ranges */ |
71 unsigned int alt_mapping; /**< alternative mapping configured */ |
72 } |
72 } |
73 ec_sync_t; |
73 ec_sync_t; |
74 |
74 |
75 /*****************************************************************************/ |
75 /*****************************************************************************/ |
76 |
76 |
77 void ec_sync_init(ec_sync_t *, const ec_slave_t *, unsigned int); |
77 void ec_sync_init(ec_sync_t *, ec_slave_t *, unsigned int); |
78 void ec_sync_clear(ec_sync_t *); |
78 void ec_sync_clear(ec_sync_t *); |
79 |
79 |
|
80 uint16_t ec_sync_size(const ec_sync_t *); |
80 void ec_sync_config(const ec_sync_t *, uint8_t *); |
81 void ec_sync_config(const ec_sync_t *, uint8_t *); |
|
82 |
|
83 int ec_sync_add_pdo(ec_sync_t *, const ec_pdo_t *); |
|
84 void ec_sync_clear_pdos(ec_sync_t *); |
81 |
85 |
82 /*****************************************************************************/ |
86 /*****************************************************************************/ |
83 |
87 |
84 #endif |
88 #endif |