This commit modifies the STM32 internal voltage reference sensor
driver to handle erroneous usage more gracefully. More precisely:
- driver no longer builds if no ADC node is enabled
- fail builds with an explicit error message when the sensor
is enabled but the corresponding ADC is not. This can only
happen on STM32 series with more than one ADC (e.g., H7).
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
15 lines
384 B
Plaintext
15 lines
384 B
Plaintext
# STM32 vref sensor configuration options
|
|
|
|
# Copyright (c) 2023 Kenneth J. Miller <ken@miller.ec>
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
config STM32_VREF
|
|
bool "STM32 VREF Sensor"
|
|
default y
|
|
depends on DT_HAS_ST_STM32_ADC_ENABLED
|
|
depends on DT_HAS_ST_STM32_VREF_ENABLED
|
|
depends on SOC_FAMILY_STM32 && !SOC_SERIES_STM32F1X
|
|
select ADC
|
|
help
|
|
Enable driver for STM32 Vref sensor.
|