mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-21 00:08:41 +01:00
Merge branch 'developer' into dev/xilinx_set_dac_rewrite
All checks were successful
All checks were successful
This commit is contained in:
@@ -11223,7 +11223,7 @@ int spi_write(int file_des) {
|
||||
|
||||
#ifdef VIRTUAL
|
||||
// For the virtual detector copy the data from local_tx to local_rx
|
||||
for (int i=0; i < n_bytes+1; i++){
|
||||
for (int i = 0; i < n_bytes + 1; i++) {
|
||||
local_rx[i] = local_tx[i];
|
||||
}
|
||||
#else
|
||||
@@ -11250,7 +11250,7 @@ int spi_write(int file_des) {
|
||||
ret = OK;
|
||||
LOG(logDEBUG1, ("SPI Write Complete\n"));
|
||||
Server_SendResult(file_des, INT32, NULL, 0);
|
||||
sendData(file_des, local_rx+1, n_bytes, OTHER);
|
||||
sendData(file_des, local_rx + 1, n_bytes, OTHER);
|
||||
|
||||
free(data);
|
||||
free(local_tx);
|
||||
|
||||
@@ -2251,7 +2251,8 @@ class Detector {
|
||||
int n_bytes, Positions pos = {}) const;
|
||||
|
||||
Result<std::vector<uint8_t>> writeSpi(int chip_id, int register_id,
|
||||
const std::vector<uint8_t> &data, Positions pos = {});
|
||||
const std::vector<uint8_t> &data,
|
||||
Positions pos = {});
|
||||
|
||||
private:
|
||||
std::vector<uint16_t> getValidPortNumbers(uint16_t start_port);
|
||||
|
||||
@@ -2961,12 +2961,10 @@ Result<std::vector<uint8_t>> Detector::readSpi(int chip_id, int register_id,
|
||||
n_bytes);
|
||||
}
|
||||
|
||||
Result<std::vector<uint8_t>> Detector::writeSpi(int chip_id, int register_id,
|
||||
const std::vector<uint8_t> &data, Positions pos){
|
||||
Result<std::vector<uint8_t>>
|
||||
Detector::writeSpi(int chip_id, int register_id,
|
||||
const std::vector<uint8_t> &data, Positions pos) {
|
||||
return pimpl->Parallel(&Module::writeSpi, pos, chip_id, register_id, data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
} // namespace sls
|
||||
|
||||
@@ -4097,7 +4097,7 @@ std::vector<uint8_t> Module::readSpi(int chip_id, int register_id,
|
||||
}
|
||||
|
||||
std::vector<uint8_t> Module::writeSpi(int chip_id, int register_id,
|
||||
const std::vector<uint8_t> &data){
|
||||
const std::vector<uint8_t> &data) {
|
||||
auto client = DetectorSocket(shm()->hostname, shm()->controlPort);
|
||||
client.Send(F_SPI_WRITE);
|
||||
client.setFnum(F_SPI_WRITE);
|
||||
@@ -4113,7 +4113,8 @@ std::vector<uint8_t> Module::writeSpi(int chip_id, int register_id,
|
||||
throw DetectorError(os.str());
|
||||
}
|
||||
|
||||
// Read the output from the SPI write. This contains the data before the write.
|
||||
// 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;
|
||||
|
||||
@@ -610,7 +610,8 @@ class Module : public virtual slsDetectorDefs {
|
||||
std::vector<uint8_t> readSpi(int chip_id, int register_id,
|
||||
int n_bytes) const;
|
||||
|
||||
std::vector<uint8_t> writeSpi(int chip_id, int register_id, const std::vector<uint8_t> &data);
|
||||
std::vector<uint8_t> writeSpi(int chip_id, int register_id,
|
||||
const std::vector<uint8_t> &data);
|
||||
|
||||
private:
|
||||
std::string getReceiverLongVersion() const;
|
||||
|
||||
Reference in New Issue
Block a user