set starting frame number of next acquisition for both jungfrau and e… (#27)

* set starting frame number of next acquisition for both jungfrau and eiger. firmware has not implemented a get, so workaround. tests included. frame number 0 not allowed due to Eiger. Eiger max frame is 48 bit, while jungfrau is 64 bit

* made argument of setstartingframenumber const
This commit is contained in:
Dhanya Thattil
2019-06-03 11:07:53 +02:00
committed by GitHub
parent 894cc1c9e0
commit 29141ac1a6
26 changed files with 398 additions and 40 deletions

View File

@ -97,6 +97,29 @@ int64_t set64BitReg(int64_t value, int aLSB, int aMSB){
}
/**
* Read unsigned 64 bit from a 64 bit register
* @param aLSB LSB offset address
* @param aMSB MSB offset address
* @returns unsigned 64 bit data read
*/
uint64_t getU64BitReg(int aLSB, int aMSB){
uint64_t retval = bus_r(aMSB);
retval = (retval << 32) | bus_r(aLSB);
return retval;
}
/**
* Write unsigned 64 bit into a 64 bit register
* @param value unsigned 64 bit data
* @param aLSB LSB offset address
* @param aMSB MSB offset address
*/
void setU64BitReg(uint64_t value, int aLSB, int aMSB){
bus_w(aLSB, value & (0xffffffff));
bus_w(aMSB, (value >> 32) & (0xffffffff));
}
/**
* Read from a 32 bit register (literal register value provided by client)
* @param offset address offset