12c0204b60
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> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Kconfig | ||
emul_max17048.c | ||
max17048.c | ||
max17048.h |