master/master.c
changeset 278 fddcb6d7869d
parent 275 ba51285d4ef6
child 291 0b1f877cf3f1
equal deleted inserted replaced
277:b9fef58af86e 278:fddcb6d7869d
  1142                 sync = type->sync_managers[j];
  1142                 sync = type->sync_managers[j];
  1143                 if (ec_command_npwr(command, slave->station_address,
  1143                 if (ec_command_npwr(command, slave->station_address,
  1144                                     0x0800 + j * EC_SYNC_SIZE, EC_SYNC_SIZE))
  1144                                     0x0800 + j * EC_SYNC_SIZE, EC_SYNC_SIZE))
  1145                     return -1;
  1145                     return -1;
  1146                 ec_sync_config(sync, slave, command->data);
  1146                 ec_sync_config(sync, slave, command->data);
  1147                 EC_INFO("configuring sync.\n");
       
  1148                 if (unlikely(ec_master_simple_io(master, command))) {
  1147                 if (unlikely(ec_master_simple_io(master, command))) {
  1149                     EC_ERR("Setting sync manager %i failed on slave %i!\n",
  1148                     EC_ERR("Setting sync manager %i failed on slave %i!\n",
  1150                            j, slave->ring_position);
  1149                            j, slave->ring_position);
  1151                     return -1;
  1150                     return -1;
  1152                 }
  1151                 }
  1221             fmmu = &slave->fmmus[j];
  1220             fmmu = &slave->fmmus[j];
  1222             if (ec_command_npwr(command, slave->station_address,
  1221             if (ec_command_npwr(command, slave->station_address,
  1223                                 0x0600 + j * EC_FMMU_SIZE, EC_FMMU_SIZE))
  1222                                 0x0600 + j * EC_FMMU_SIZE, EC_FMMU_SIZE))
  1224                 return -1;
  1223                 return -1;
  1225             ec_fmmu_config(fmmu, slave, command->data);
  1224             ec_fmmu_config(fmmu, slave, command->data);
  1226             EC_INFO("configuring fmmu.\n");
       
  1227             if (unlikely(ec_master_simple_io(master, command))) {
  1225             if (unlikely(ec_master_simple_io(master, command))) {
  1228                 EC_ERR("Setting FMMU %i failed on slave %i!\n",
  1226                 EC_ERR("Setting FMMU %i failed on slave %i!\n",
  1229                        j, slave->ring_position);
  1227                        j, slave->ring_position);
  1230                 return -1;
  1228                 return -1;
  1231             }
  1229             }