equal
deleted
inserted
replaced
138 */ |
138 */ |
139 void ec_fsm_coe_map_state_start( |
139 void ec_fsm_coe_map_state_start( |
140 ec_fsm_coe_map_t *fsm /**< finite state machine */ |
140 ec_fsm_coe_map_t *fsm /**< finite state machine */ |
141 ) |
141 ) |
142 { |
142 { |
143 // read Pdo assignment for first sync manager |
143 // read Pdo assignment for first sync manager not reserved for mailbox |
144 fsm->sync_index = 0xff; // next is 0 |
144 fsm->sync_index = 1; // next is 2 |
145 ec_fsm_coe_map_action_next_sync(fsm); |
145 ec_fsm_coe_map_action_next_sync(fsm); |
146 } |
146 } |
147 |
147 |
148 /*****************************************************************************/ |
148 /*****************************************************************************/ |
149 |
149 |
155 { |
155 { |
156 ec_slave_t *slave = fsm->slave; |
156 ec_slave_t *slave = fsm->slave; |
157 |
157 |
158 fsm->sync_index++; |
158 fsm->sync_index++; |
159 |
159 |
160 if (slave->master->debug_level) |
|
161 EC_DBG("Processing SM%u of slave %u.\n", |
|
162 fsm->sync_index, slave->ring_position); |
|
163 |
|
164 for (; fsm->sync_index < EC_MAX_SYNCS; fsm->sync_index++) { |
160 for (; fsm->sync_index < EC_MAX_SYNCS; fsm->sync_index++) { |
165 if (!(fsm->sync = ec_slave_get_sync(slave, fsm->sync_index))) { |
161 if (!(fsm->sync = ec_slave_get_sync(slave, fsm->sync_index))) |
166 if (slave->master->debug_level) |
|
167 EC_DBG("Slave %u does not provide a configuration for " |
|
168 "SM%u!\n", fsm->slave->ring_position, fsm->sync_index); |
|
169 continue; |
162 continue; |
170 } |
|
171 |
163 |
172 fsm->sync_sdo_index = 0x1C10 + fsm->sync_index; |
164 fsm->sync_sdo_index = 0x1C10 + fsm->sync_index; |
173 |
165 |
174 if (slave->master->debug_level) |
166 if (slave->master->debug_level) |
175 EC_DBG("Reading Pdo assignment of SM%u of slave %u.\n", |
167 EC_DBG("Reading Pdo assignment of SM%u of slave %u.\n", |