Fetch Sdo dictionaries and process SII requests in operation mode.
This commit is contained in:
parent
066546e81c
commit
24ac60fdcc
2
NEWS
2
NEWS
|
|
@ -50,6 +50,8 @@ Changes in version 1.4.0:
|
|||
function.
|
||||
- Removed the bus_state and bus_tainted flags from ec_master_state_t.
|
||||
* Removed include/ecdb.h.
|
||||
* Sdo dictionaries will now also be fetched in operation mode.
|
||||
* SII write requests will now also be processed in operation mode.
|
||||
* Mapping of Pdo entries is now supported.
|
||||
* Current Pdo assignment/mapping is now read via CoE during bus scan, using
|
||||
direct Sdo access, independent of the dictionary.
|
||||
|
|
|
|||
1
TODO
1
TODO
|
|
@ -16,7 +16,6 @@ Version 1.4.0:
|
|||
* Mailbox protocol handlers.
|
||||
* Remove get_cycles() calls and references to cpu_khz to increase
|
||||
portability.
|
||||
* Scanning of Sdo dictionary / writing EEPROM in OPERATION state.
|
||||
* Remove the end state of the master state machine.
|
||||
* SDO write access in sysfs.
|
||||
* Update documentation.
|
||||
|
|
|
|||
|
|
@ -444,37 +444,34 @@ void ec_fsm_master_action_idle(
|
|||
if (ec_fsm_master_action_process_sdo(fsm))
|
||||
return;
|
||||
|
||||
if (master->mode == EC_MASTER_MODE_IDLE) {
|
||||
|
||||
// check, if slaves have an Sdo dictionary to read out.
|
||||
list_for_each_entry(slave, &master->slaves, list) {
|
||||
if (!(slave->sii.mailbox_protocols & EC_MBOX_COE)
|
||||
// check, if slaves have an Sdo dictionary to read out.
|
||||
list_for_each_entry(slave, &master->slaves, list) {
|
||||
if (!(slave->sii.mailbox_protocols & EC_MBOX_COE)
|
||||
|| slave->sdo_dictionary_fetched
|
||||
|| slave->current_state == EC_SLAVE_STATE_INIT
|
||||
|| jiffies - slave->jiffies_preop < EC_WAIT_SDO_DICT * HZ
|
||||
|| slave->error_flag) continue;
|
||||
|
||||
if (master->debug_level) {
|
||||
EC_DBG("Fetching Sdo dictionary from slave %u.\n",
|
||||
slave->ring_position);
|
||||
}
|
||||
|
||||
slave->sdo_dictionary_fetched = 1;
|
||||
|
||||
// start fetching Sdo dictionary
|
||||
fsm->idle = 0;
|
||||
fsm->slave = slave;
|
||||
fsm->state = ec_fsm_master_state_sdo_dictionary;
|
||||
ec_fsm_coe_dictionary(&fsm->fsm_coe, slave);
|
||||
ec_fsm_coe_exec(&fsm->fsm_coe); // execute immediately
|
||||
return;
|
||||
if (master->debug_level) {
|
||||
EC_DBG("Fetching Sdo dictionary from slave %u.\n",
|
||||
slave->ring_position);
|
||||
}
|
||||
|
||||
// check for pending SII write operations.
|
||||
if (ec_fsm_master_action_process_sii(fsm))
|
||||
return; // SII write request found
|
||||
slave->sdo_dictionary_fetched = 1;
|
||||
|
||||
// start fetching Sdo dictionary
|
||||
fsm->idle = 0;
|
||||
fsm->slave = slave;
|
||||
fsm->state = ec_fsm_master_state_sdo_dictionary;
|
||||
ec_fsm_coe_dictionary(&fsm->fsm_coe, slave);
|
||||
ec_fsm_coe_exec(&fsm->fsm_coe); // execute immediately
|
||||
return;
|
||||
}
|
||||
|
||||
// check for pending SII write operations.
|
||||
if (ec_fsm_master_action_process_sii(fsm))
|
||||
return; // SII write request found
|
||||
|
||||
fsm->state = ec_fsm_master_state_end;
|
||||
}
|
||||
|
||||
|
|
@ -842,7 +839,7 @@ void ec_fsm_master_state_sdo_dictionary(
|
|||
if (master->debug_level) {
|
||||
unsigned int sdo_count, entry_count;
|
||||
ec_slave_sdo_dict_info(slave, &sdo_count, &entry_count);
|
||||
EC_DBG("Fetched %i Sdos and %i entries from slave %i.\n",
|
||||
EC_DBG("Fetched %u Sdos and %u entries from slave %u.\n",
|
||||
sdo_count, entry_count, slave->ring_position);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue