1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/adcxx1c: Update kconfig model

This commit is contained in:
MrKevinWeiss 2022-03-02 14:03:28 +01:00
parent f08f3886ec
commit af45f94a2f
No known key found for this signature in database
GPG Key ID: 3514539D7808D123
2 changed files with 47 additions and 25 deletions

View File

@ -5,32 +5,10 @@
# directory for more details.
#
choice
bool "ADCXX1C Analog-to-Digital converter"
depends on HAS_PERIPH_GPIO
depends on HAS_PERIPH_GPIO_IRQ
depends on HAS_PERIPH_I2C
depends on TEST_KCONFIG
optional
help
This driver works with adc081c, adc101c and adc121c models. Select one.
config MODULE_ADC081C
bool "ADC081C"
select MODULE_ADCXX1C
config MODULE_ADC101C
bool "ADC101C"
select MODULE_ADCXX1C
config MODULE_ADC121C
bool "ADC121C"
select MODULE_ADCXX1C
endchoice
config MODULE_ADCXX1C
menuconfig MODULE_ADCXX1C
bool
prompt "ADCXX1C Analog-to-Digital converter" if !(SAUL_DEFAULT && HAVE_ADCXX1C)
default SAUL_DEFAULT && HAVE_ADCXX1C
depends on HAS_PERIPH_GPIO
depends on HAS_PERIPH_GPIO_IRQ
depends on HAS_PERIPH_I2C
@ -38,3 +16,46 @@ config MODULE_ADCXX1C
select MODULE_PERIPH_GPIO
select MODULE_PERIPH_GPIO_IRQ
select MODULE_PERIPH_I2C
choice ADCXX1C_VARIANT
bool "Variants"
depends on MODULE_ADCXX1C
default MODULE_ADC081C if HAVE_ADC081C
default MODULE_ADC101C if HAVE_ADC101C
default MODULE_ADC121C if HAVE_ADC121C
help
This driver works with adc081c, adc101c and adc121c models. Select one.
config MODULE_ADC081C
bool "ADC081C"
config MODULE_ADC101C
bool "ADC101C"
config MODULE_ADC121C
bool "ADC121C"
endchoice
config HAVE_ADCXX1C
bool
help
Indicates that ADCXX1C Analog-to-Digital is present.
config HAVE_ADC081C
bool
select HAVE_ADCXX1C
help
Indicates that ADC081C Analog-to-Digital is present.
config HAVE_ADC101C
bool
select HAVE_ADCXX1C
help
Indicates that ADC101C Analog-to-Digital is present.
config HAVE_ADC121C
bool
select HAVE_ADCXX1C
help
Indicates that ADC121C Analog-to-Digital is present.

View File

@ -1,4 +1,5 @@
# this file enables modules defined in Kconfig. Do not use this file for
# application configuration. This is only needed during migration.
CONFIG_MODULE_ADC081C=y
CONFIG_MODULE_ADCXX1C=y
CONFIG_MODULE_XTIMER=y