bug fix: internal hv used ofst instead of msk, insignificant bug though, would have worked

This commit is contained in:
maliakal_d 2019-07-23 14:13:41 +02:00
parent 61b40d89c7
commit e3f151851c
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}