drivers: adc: stm32 adc API has a valid internal reference
extend the stm32 adc api to set the ref_internal of 3.3V Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
parent
a5ad4e8a56
commit
29d0660585
1 changed files with 4 additions and 0 deletions
|
@ -40,6 +40,9 @@ LOG_MODULE_REGISTER(adc_stm32);
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/* reference voltage for the ADC */
|
||||
#define STM32_ADC_VREF_MV DT_INST_PROP(0, vref_mv)
|
||||
|
||||
#if !defined(CONFIG_SOC_SERIES_STM32F0X) && \
|
||||
!defined(CONFIG_SOC_SERIES_STM32G0X) && \
|
||||
!defined(CONFIG_SOC_SERIES_STM32L0X) && \
|
||||
|
@ -1079,6 +1082,7 @@ static const struct adc_driver_api api_stm32_driver_api = {
|
|||
#ifdef CONFIG_ADC_ASYNC
|
||||
.read_async = adc_stm32_read_async,
|
||||
#endif
|
||||
.ref_internal = STM32_ADC_VREF_MV, /* VREF is usually connected to VDD */
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ADC_STM32_SHARED_IRQS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue