Skip to content
Commit 99804c77 authored by Aurelien Jarno's avatar Aurelien Jarno Committed by Anas Nashif
Browse files

drivers: sensor: stm32_vbat: get rid of floating point computation



Instead of using floating point operations to compute the vbat voltage,
it is possible to do the computation using 32-bit variables by
reordering operations and using the sensor_value_from_milli() function.

On a STM32G0, this saves 140 bytes of flash, excluding the FP library
needed on a FPU less MCU.

Signed-off-by: default avatarAurelien Jarno <aurelien@aurel32.net>
parent 859cc2f1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment