zephyr/drivers/fuel_gauge
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
..
bq27z746 fuel_gauge: Fix desired current/voltage units 2023-10-09 19:01:49 +03:00
max17048 drivers: fuel_gauge: max17048: Fix overflow when calculating voltage 2023-10-13 19:07:38 +01:00
sbs_gauge fuel_gauge: Fix desired current/voltage units 2023-10-09 19:01:49 +03:00
CMakeLists.txt drivers: fuelgauge: Add TI BQ27z746 driver 2023-09-13 12:05:04 +02:00
emul_fuel_gauge_syscall_handlers.c emul: Add syscall support for fuel gauge emulators 2023-09-12 17:23:00 +01:00
fuel_gauge_syscall_handlers.c fuel_gauge: Repl property struct w/ union 2023-09-27 12:07:59 +02:00
Kconfig drivers: fuelgauge: Add TI BQ27z746 driver 2023-09-13 12:05:04 +02:00