Fix bit write cmnd

This commit is contained in:
Norbert Richter 2021-01-21 10:34:49 +01:00
parent 52d42512ee
commit a17eca7e47
No known key found for this signature in database
GPG Key ID: 6628701A626FA674
1 changed files with 1 additions and 1 deletions

View File

@ -1178,7 +1178,7 @@ bool NeoPoolCmnd(void)
data[0] = (data[0] >> bit) & 0x0001;
}
if (3 == params_cnt) {
if (NEOPOOL_OK != NeoPoolReadRegister(addr, &tempdata, 1)) {
if (NEOPOOL_OK == NeoPoolReadRegister(addr, &tempdata, 1)) {
tempdata &= ~(1<<bit);
tempdata |= (data[0]<<bit);
serviced = (NEOPOOL_OK == NeoPoolWriteRegister(addr, &tempdata, 1));