ADC: Use 16-bit raw values for calculations
Using 16-bit for calculation allows to increase resolution by oversampling. The ADC was already configured to use left-aligned 12-bit readings, which can be treated the same as 16-bit native readings.
This commit is contained in:
committed by
Martin Jäger
parent
3bb4a86b5c
commit
4008a09f3b
+1
-1
@@ -38,7 +38,7 @@
|
||||
|
||||
#if defined(CONFIG_SOC_SERIES_STM32F0X) || defined(CONFIG_SOC_SERIES_STM32L0X)
|
||||
|
||||
// automatich channel selection based on devicetree settings
|
||||
// automatic channel selection based on devicetree settings
|
||||
#define ADC_CHSEL_FN(node_id) (1UL << DT_PHA(node_id, io_channels, input)) |
|
||||
#define ADC_CHSEL (DT_FOREACH_CHILD(DT_PATH(adc_inputs), ADC_CHSEL_FN) 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user