mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-01 01:26:05 +00:00
When a sensor that depends on an ADC is enabled in devicetree, enable the ADC subsystem. ADC is roughly equivalent to a bus for these sensors (the mechanism through which data is transferred), which had the same conversion applied in #48707. The same benefits apply here, namely removing the need for the following pattern in board `.kconfig` files: ``` configdefault ADC default y if SENSOR ``` Signed-off-by: Jordan Yates <jordan@embeint.com>
44 lines
1.1 KiB
Plaintext
44 lines
1.1 KiB
Plaintext
# Copyright 2023 Google LLC
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
config INPUT_ANALOG_AXIS
|
|
bool "ADC based analog axis input driver"
|
|
default y
|
|
depends on DT_HAS_ANALOG_AXIS_ENABLED
|
|
depends on MULTITHREADING
|
|
select ADC
|
|
help
|
|
ADC based analog axis input driver
|
|
|
|
if INPUT_ANALOG_AXIS
|
|
|
|
config INPUT_ANALOG_AXIS_THREAD_STACK_SIZE
|
|
int "Stack size for the analog axis thread"
|
|
default 762
|
|
help
|
|
Size of the stack used for the analog axis thread.
|
|
|
|
config INPUT_ANALOG_AXIS_THREAD_PRIORITY
|
|
int "Priority for the analog axis thread"
|
|
default 0
|
|
help
|
|
Priority level of the analog axis thread.
|
|
|
|
config INPUT_ANALOG_AXIS_SETTINGS
|
|
bool "Analog axis settings support"
|
|
default y
|
|
depends on SETTINGS
|
|
help
|
|
Settings support for the analog axis driver, exposes a
|
|
analog_axis_calibration_save() function to save the calibration into
|
|
settings and load them automatically on startup.
|
|
|
|
config INPUT_ANALOG_AXIS_SETTINGS_MAX_AXES
|
|
int "Maximum number of axes supported in the settings."
|
|
default 8
|
|
help
|
|
Maximum number of axes that can have calibration value saved in
|
|
settings.
|
|
|
|
endif
|