initial implementation

This commit is contained in:
Erik Frojdh
2021-03-29 14:21:48 +02:00
parent 7c4f9ee044
commit 043d582616
17 changed files with 164 additions and 3 deletions

View File

@ -35,6 +35,32 @@ int getChipStatusRegister(){
return chipStatusRegister;
}
// int setGainCaps(int caps){
// int csr = getChipStatusRegister();
// int gain_mask = 0;
// gain_mask |= 1 << CSR_C10pre;
// gain_mask |= 1 << CSR_C15sh;
// gain_mask |= 1 << CSR_C30sh;
// gain_mask |= 1 << CSR_C50sh;
// gain_mask |= 1 << CSR_C225ACsh;
// gain_mask |= 1 << CSR_C15pre;
// LOG(logINFO, ("gain_mask: 0x%x\n", gain_mask));
// LOG(logINFO, ("csr: 0x%x\n", csr));
// csr &= ~gain_mask; //zero out the bits in the gain mask
// LOG(logINFO, ("csr: 0x%x\n", csr));
// caps &= gain_mask;
// csr |= caps;
// LOG(logINFO, ("csr: 0x%x\n", csr));
// //now comes the actual setting
// return 0;
// }
patternParameters *setChipStatusRegister(int csr) {
int iaddr=0;
int nbits=18;