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

drivers/lpsxxx: fix variant selection

This commit is contained in:
Francisco Molina 2021-12-07 20:18:21 +01:00
parent cfdd941f9b
commit 2dab9eeb32
2 changed files with 46 additions and 13 deletions

View File

@ -6,38 +6,42 @@
# directory for more details.
#
choice
bool "LPSXXX Pressure Sensors"
optional
menuconfig MODULE_LPSXXX
bool
prompt "LPSXXX Pressure Sensors" if !(MODULE_SAUL_DEFAULT && HAVE_LPSXXX)
depends on HAS_PERIPH_I2C
depends on TEST_KCONFIG
select MODULE_PERIPH_I2C
help
Device driver for the LPSXXX pressure sensor family
(LPS331AP/LPS25HB/LPS22HB/LPS22HH). Select a model.
if MODULE_LPSXXX
choice LPSXXX_VARIANT
bool "Model"
default MODULE_LPS331AP if HAVE_LPS331AP
default MODULE_LPS22HB if HAVE_LPS22HB
default MODULE_LPS22HH if HAVE_LPS22HH
default MODULE_LPS25HB if HAVE_LPS25HB
help
Device driver for the LPSXXX pressure sensor family
(LPS331AP/LPS25HB/LPS22HB/LPS22HH). Select a model.
config MODULE_LPS331AP
bool "LPS331AP"
select MODULE_LPSXXX
config MODULE_LPS22HB
bool "LPS22HB"
select MODULE_LPSXXX
config MODULE_LPS22HH
bool "LPS22HH"
select MODULE_LPSXXX
config MODULE_LPS25HB
bool "LPS25HB"
select MODULE_LPSXXX
endchoice
config MODULE_LPSXXX
bool
depends on HAS_PERIPH_I2C
depends on TEST_KCONFIG
select MODULE_PERIPH_I2C
endif # MODULE_LPSXXX
menuconfig KCONFIG_USEMODULE_LPSXXX
bool "Configure LPSXXX driver"
@ -58,3 +62,31 @@ config LPSXXX_DEFAULT_ADDRESS
datasheet.
endif # KCONFIG_USEMODULE_LPSXXX
config HAVE_LPSXXX
bool
select MODULE_LPSXXX if MODULE_SAUL_DEFAULT
config HAVE_LPS331AP
bool
select HAVE_LPSXXX
help
Indicates that a LPS331AP sensor is present.
config HAVE_LPS22HB
bool
select HAVE_LPSXXX
help
Indicates that a LPS22HB sensor is present.
config HAVE_LPS22HH
bool
select HAVE_LPSXXX
help
Indicates that a LPS22HH sensor is present.
config HAVE_LPS25HB
bool
select HAVE_LPSXXX
help
Indicates that a LPS25HB sensor 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_LPS331AP=y
CONFIG_MODULE_LPSXXX=y
CONFIG_MODULE_XTIMER=y