zephyr/boards/arm/stm32g071b_disco
Gerard Marull-Paretas d5734bc003 drivers: sensor: ina23x: specify current LSB in uA and fix units
Specify the units of the current LSB in microamperes, so that we can
measure low maximum currents. Right now it was specified in
milliamperes, but ignored and always hardcoded to 1mA in the driver.
This makes the driver pretty much useless when the maximum current to be
measured is in a range of e.g. 20-50mA.

This patch also removes some unnecessary ifdeffery: since we write the
calibration register, we can always provice measurements with the right
units. It is also wrong to provide sensor readings that do not match
with the units specified by the channel. After this change voltage is
always reported in V, current in A and power in W.

Note that power measurement had the current LSB hardcoded in the
calculation (assuming 1mA/LSB), this has been fixed as well.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-15 10:23:17 +01:00
..
doc boards: convert images to JPEG and reduce image size 2022-08-29 10:18:18 +02:00
Kconfig.board
Kconfig.defconfig
board.cmake
stm32g071b_disco.dts drivers: sensor: ina23x: specify current LSB in uA and fix units 2022-11-15 10:23:17 +01:00
stm32g071b_disco.yaml
stm32g071b_disco_defconfig