d5734bc003
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> |
||
---|---|---|
.. | ||
doc | ||
Kconfig.board | ||
Kconfig.defconfig | ||
board.cmake | ||
stm32g071b_disco.dts | ||
stm32g071b_disco.yaml | ||
stm32g071b_disco_defconfig |