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> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Kconfig | ||
ina23x_common.c | ||
ina23x_common.h | ||
ina23x_trigger.c | ||
ina23x_trigger.h | ||
ina230.c | ||
ina230.h | ||
ina230_trigger.c | ||
ina237.c | ||
ina237.h |