zephyr/drivers/sensor/adxl372
Keith Packard 7c6fe0735d drivers/adxl372: Fix computation of sensor value
Sensor value computation was creating a 64-bit integer value, passing
that to 'abs' and assigning that to an int32_t result and then sanity
checking the result. If the computation goes badly wrong, then the range
reduction of 64-bit to 32-bit values could generate a falsely in-range
value.

Instead, perform the computation in 64-bits, range check that value and
then assign to a 32-bit variable.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-06-14 01:50:36 +09:00
..
CMakeLists.txt
Kconfig
adxl372.c drivers/adxl372: Fix computation of sensor value 2022-06-14 01:50:36 +09:00
adxl372.h
adxl372_trigger.c