mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 09:18:00 +01:00
Fix bitshift on read in ADE7953 (#2537)
This commit is contained in:
parent
4dd1bf920d
commit
f83950fd75
1 changed files with 3 additions and 3 deletions
|
@ -76,9 +76,9 @@ class ADE7953 : public i2c::I2CDevice, public PollingComponent {
|
||||||
return err;
|
return err;
|
||||||
*value = 0;
|
*value = 0;
|
||||||
*value |= ((uint32_t) recv[0]) << 24;
|
*value |= ((uint32_t) recv[0]) << 24;
|
||||||
*value |= ((uint32_t) recv[1]) << 24;
|
*value |= ((uint32_t) recv[1]) << 16;
|
||||||
*value |= ((uint32_t) recv[2]) << 24;
|
*value |= ((uint32_t) recv[2]) << 8;
|
||||||
*value |= ((uint32_t) recv[3]) << 24;
|
*value |= ((uint32_t) recv[3]);
|
||||||
return i2c::ERROR_OK;
|
return i2c::ERROR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue