zephyr/drivers/fuel_gauge/max17048
Martin Calsyn 12c0204b60 drivers: fuel_gauge: max17048: Fix overflow when calculating voltage
Annotate the calculation with type casts to force
promotion to uint32_t and then cast back down
to uint16_t for the return. This solves the issue
with invalid voltage (mV) values being returned
due to overflow during the conversion from the
register value on the max17048 chip.

Signed-off-by: Martin Calsyn <martin.calsyn@outcomex.com.au>
2023-10-13 19:07:38 +01:00
..
CMakeLists.txt
Kconfig
emul_max17048.c
max17048.c drivers: fuel_gauge: max17048: Fix overflow when calculating voltage 2023-10-13 19:07:38 +01:00
max17048.h