mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
drivers/si114x: Update kconfig model
This commit is contained in:
parent
48e88c47aa
commit
f185d7acab
@ -5,33 +5,53 @@
|
|||||||
# directory for more details.
|
# directory for more details.
|
||||||
#
|
#
|
||||||
|
|
||||||
if TEST_KCONFIG
|
menuconfig MODULE_SI114X
|
||||||
|
|
||||||
choice
|
|
||||||
bool "Si1145/6/7 UV/Ambient light/Proximity sensors"
|
|
||||||
optional
|
|
||||||
depends on HAS_PERIPH_I2C
|
|
||||||
depends on TEST_KCONFIG
|
|
||||||
|
|
||||||
config MODULE_SI1145
|
|
||||||
bool "SI1145"
|
|
||||||
select MODULE_SI114X
|
|
||||||
|
|
||||||
config MODULE_SI1146
|
|
||||||
bool "SI1146"
|
|
||||||
select MODULE_SI114X
|
|
||||||
|
|
||||||
config MODULE_SI1147
|
|
||||||
bool "SI1147"
|
|
||||||
select MODULE_SI114X
|
|
||||||
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
config MODULE_SI114X
|
|
||||||
bool
|
bool
|
||||||
|
prompt "Si1145/6/7 UV/Ambient light/Proximity sensors" if !(MODULE_SAUL_DEFAULT && HAVE_SI114X)
|
||||||
|
default (MODULE_SAUL_DEFAULT && HAVE_SI114X)
|
||||||
|
depends on TEST_KCONFIG
|
||||||
depends on HAS_PERIPH_I2C
|
depends on HAS_PERIPH_I2C
|
||||||
select MODULE_PERIPH_I2C
|
select MODULE_PERIPH_I2C
|
||||||
select MODULE_ZTIMER
|
select MODULE_ZTIMER
|
||||||
select MODULE_ZTIMER_MSEC
|
select MODULE_ZTIMER_MSEC
|
||||||
|
|
||||||
endif # TEST_KCONFIG
|
choice SI114X_VARIANT
|
||||||
|
bool "variant"
|
||||||
|
depends on MODULE_SI114X
|
||||||
|
default MODULE_SI1145 if HAVE_SI1145
|
||||||
|
default MODULE_SI1146 if HAVE_SI1146
|
||||||
|
default MODULE_SI1147 if HAVE_SI1147
|
||||||
|
|
||||||
|
config MODULE_SI1145
|
||||||
|
bool "SI1145"
|
||||||
|
|
||||||
|
config MODULE_SI1146
|
||||||
|
bool "SI1146"
|
||||||
|
|
||||||
|
config MODULE_SI1147
|
||||||
|
bool "SI1147"
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config HAVE_SI114X
|
||||||
|
bool
|
||||||
|
help
|
||||||
|
Indicates that a Si114X UV/Ambient light/Proximity sensor is present.
|
||||||
|
|
||||||
|
config HAVE_SI1145
|
||||||
|
bool
|
||||||
|
select HAVE_SI114X
|
||||||
|
help
|
||||||
|
Indicates that a Si1145 UV/Ambient light/Proximity sensor is present.
|
||||||
|
|
||||||
|
config HAVE_SI1146
|
||||||
|
bool
|
||||||
|
select HAVE_SI114X
|
||||||
|
help
|
||||||
|
Indicates that a Si1146 UV/Ambient light/Proximity sensor is present.
|
||||||
|
|
||||||
|
config HAVE_SI1147
|
||||||
|
bool
|
||||||
|
select HAVE_SI114X
|
||||||
|
help
|
||||||
|
Indicates that a Si1147 UV/Ambient light/Proximity sensor is present.
|
||||||
|
@ -4,5 +4,6 @@
|
|||||||
CONFIG_MODULE_ZTIMER=y
|
CONFIG_MODULE_ZTIMER=y
|
||||||
CONFIG_MODULE_ZTIMER_MSEC=y
|
CONFIG_MODULE_ZTIMER_MSEC=y
|
||||||
|
|
||||||
|
CONFIG_MODULE_SI114X=y
|
||||||
# This test should also work with Si1146 and Si1147 variants.
|
# This test should also work with Si1146 and Si1147 variants.
|
||||||
CONFIG_MODULE_SI1145=y
|
CONFIG_MODULE_SI1145=y
|
||||||
|
Loading…
Reference in New Issue
Block a user