commit | 4420c5ed40f4363b58e1fb800a8b6be483f7b1fe | [log] [tgz] |
---|---|---|
author | Peter A. Bigot <pab@pabigot.com> | Thu Dec 26 13:16:21 2019 -0600 |
committer | Carles CufĂ <carles.cufi@nordicsemi.no> | Mon Feb 03 16:26:51 2020 +0100 |
tree | 63ba2867467fefb398c91b55f4efc7c3c308262f | |
parent | 64381957019aa0403bf78855ea72ec2f88052cf5 [diff] |
adc: provide API to help with conversions Gain values are specified with enumeration values that can't be used to reverse the effects of scaling the input signal. Provide a function that reverses the effect of the gain by scaling a measured value. Also provide a function that converts a raw measurement captured with a reference voltage and specific gain and resolution to the corresponding voltage in millivolts. Signed-off-by: Peter A. Bigot <pab@pabigot.com>