mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-05-15 08:35:34 +02:00
send back the result of the SPI write (#1387)
Build on RHEL9 / build (push) Successful in 3m21s
Build on RHEL8 / build (push) Successful in 4m47s
Run Simulator Tests on local RHEL9 / build (push) Successful in 14m39s
Build on local RHEL9 / build (push) Successful in 1m25s
Run Simulator Tests on local RHEL8 / build (push) Successful in 16m57s
Build on local RHEL8 / build (push) Successful in 3m32s
Build on RHEL9 / build (push) Successful in 3m21s
Build on RHEL8 / build (push) Successful in 4m47s
Run Simulator Tests on local RHEL9 / build (push) Successful in 14m39s
Build on local RHEL9 / build (push) Successful in 1m25s
Run Simulator Tests on local RHEL8 / build (push) Successful in 16m57s
Build on local RHEL8 / build (push) Successful in 3m32s
This commit is contained in:
@@ -4097,7 +4097,7 @@ std::vector<uint8_t> Module::readSpi(int chip_id, int register_id,
|
||||
|
||||
}
|
||||
|
||||
void Module::writeSpi(int chip_id, int register_id,
|
||||
std::vector<uint8_t> Module::writeSpi(int chip_id, int register_id,
|
||||
const std::vector<uint8_t> &data){
|
||||
auto client = DetectorSocket(shm()->hostname, shm()->controlPort);
|
||||
client.Send(F_SPI_WRITE);
|
||||
@@ -4113,6 +4113,11 @@ void Module::writeSpi(int chip_id, int register_id,
|
||||
<< " returned error: " << client.readErrorMessage();
|
||||
throw DetectorError(os.str());
|
||||
}
|
||||
|
||||
// Read the output from the SPI write. This contains the data before the write.
|
||||
std::vector<uint8_t> ret(data.size());
|
||||
client.Receive(ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // namespace sls
|
||||
|
||||
Reference in New Issue
Block a user