mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-04 17:10:42 +02:00
bug fix: internal hv used ofst instead of msk, insignificant bug though, would have worked
This commit is contained in:
parent
61b40d89c7
commit
e3f151851c
Binary file not shown.
@ -1423,13 +1423,13 @@ int setHighVoltage(int val){
|
||||
uint32_t addr = POWER_REG;
|
||||
|
||||
// switch to external high voltage
|
||||
bus_w(addr, bus_r(addr) & (~POWER_HV_INTERNAL_SLCT_OFST));
|
||||
bus_w(addr, bus_r(addr) & (~POWER_HV_INTERNAL_SLCT_MSK));
|
||||
|
||||
MAX1932_Set(val);
|
||||
|
||||
// switch on internal high voltage, if set
|
||||
if (val > 0)
|
||||
bus_w(addr, bus_r(addr) | POWER_HV_INTERNAL_SLCT_OFST);
|
||||
bus_w(addr, bus_r(addr) | POWER_HV_INTERNAL_SLCT_MSK);
|
||||
|
||||
highvoltage = val;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user