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

drivers/si70xx/kconfig: rework

This commit is contained in:
Leandro Lanzieri 2021-11-12 14:59:26 +01:00
parent a8d679062a
commit 6a1340da26
No known key found for this signature in database
GPG Key ID: F4E9A721761C7593
2 changed files with 48 additions and 28 deletions

View File

@ -5,36 +5,55 @@
# directory for more details.
#
if TEST_KCONFIG
choice
bool "Si7006/13/20/21 temperature and humidity sensors"
optional
depends on HAS_PERIPH_I2C
depends on TEST_KCONFIG
config MODULE_SI7006
bool "SI7006"
select MODULE_SI70XX
config MODULE_SI7013
bool "SI7013"
select MODULE_SI70XX
config MODULE_SI7020
bool "SI7020"
select MODULE_SI70XX
config MODULE_SI7021
bool "SI7021"
select MODULE_SI70XX
endchoice
config MODULE_SI70XX
bool
bool "Si7006/13/20/21 temperature and humidity sensors"
depends on TEST_KCONFIG
depends on HAS_PERIPH_I2C
select MODULE_PERIPH_I2C
select MODULE_XTIMER
endif # TEST_KCONFIG
choice
bool "Sensor variant"
depends on MODULE_SI70XX
default MODULE_SI7006 if HAVE_SI7006
default MODULE_SI7013 if HAVE_SI7013
default MODULE_SI7020 if HAVE_SI7020
default MODULE_SI7021 if HAVE_SI7021
config MODULE_SI7006
bool "SI7006"
config MODULE_SI7013
bool "SI7013"
config MODULE_SI7020
bool "SI7020"
config MODULE_SI7021
bool "SI7021"
endchoice
config HAVE_SI7006
bool
select MODULE_SI70XX if MODULE_SAUL_DEFAULT
help
Indicates that a si7006 sensor is present.
config HAVE_SI7013
bool
select MODULE_SI70XX if MODULE_SAUL_DEFAULT
help
Indicates that a si7013 sensor is present.
config HAVE_SI7020
bool
select MODULE_SI70XX if MODULE_SAUL_DEFAULT
help
Indicates that a si7020 sensor is present.
config HAVE_SI7021
bool
select MODULE_SI70XX if MODULE_SAUL_DEFAULT
help
Indicates that a si7021 sensor is present.

View File

@ -2,4 +2,5 @@
# application configuration. This is only needed during migration.
# This test should also work with Si7006, Si7013 and Si7020 variants.
CONFIG_MODULE_SI70XX=y
CONFIG_MODULE_SI7021=y