mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
drivers/ina2xx: Update kconfig model
This commit is contained in:
parent
bb444214f9
commit
d2f3e6c0de
@ -5,25 +5,43 @@
|
|||||||
# directory for more details.
|
# directory for more details.
|
||||||
#
|
#
|
||||||
|
|
||||||
choice
|
menuconfig MODULE_INA2XX
|
||||||
bool "INA2XX current/power monitor"
|
bool
|
||||||
optional
|
prompt "INA2XX current/power monitor" if !(MODULE_SAUL_DEFAULT && HAVE_INA2XX)
|
||||||
|
default (MODULE_SAUL_DEFAULT && HAVE_INA2XX)
|
||||||
depends on HAS_PERIPH_I2C
|
depends on HAS_PERIPH_I2C
|
||||||
depends on TEST_KCONFIG
|
depends on TEST_KCONFIG
|
||||||
|
select MODULE_PERIPH_I2C
|
||||||
|
|
||||||
|
choice INA2XX_VARIANT
|
||||||
|
bool "Variant"
|
||||||
|
depends on MODULE_INA2XX
|
||||||
|
default MODULE_INA219 if HAVE_INA219
|
||||||
|
default MODULE_INA220 if HAVE_INA220
|
||||||
help
|
help
|
||||||
Select one of the supported models.
|
Select one of the supported models.
|
||||||
|
|
||||||
config MODULE_INA219
|
config MODULE_INA219
|
||||||
bool "INA219"
|
bool "INA219"
|
||||||
select MODULE_INA2XX
|
|
||||||
|
|
||||||
config MODULE_INA220
|
config MODULE_INA220
|
||||||
bool "INA220"
|
bool "INA220"
|
||||||
select MODULE_INA2XX
|
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
config MODULE_INA2XX
|
config HAVE_INA2XX
|
||||||
bool
|
bool
|
||||||
depends on HAS_PERIPH_I2C
|
help
|
||||||
select MODULE_PERIPH_I2C
|
Indicates that a INA2XX current/power monitor is present.
|
||||||
|
|
||||||
|
config HAVE_INA219
|
||||||
|
bool
|
||||||
|
select HAVE_INA2XX
|
||||||
|
help
|
||||||
|
Indicates that a INA219 current/power monitor is present.
|
||||||
|
|
||||||
|
config HAVE_INA220
|
||||||
|
bool
|
||||||
|
select HAVE_INA2XX
|
||||||
|
help
|
||||||
|
Indicates that a INA220 current/power monitor is present.
|
||||||
|
@ -3,3 +3,4 @@
|
|||||||
CONFIG_MODULE_FMT=y
|
CONFIG_MODULE_FMT=y
|
||||||
CONFIG_MODULE_FMT_TABLE=y
|
CONFIG_MODULE_FMT_TABLE=y
|
||||||
CONFIG_MODULE_INA219=y
|
CONFIG_MODULE_INA219=y
|
||||||
|
CONFIG_MODULE_INA2XX=y
|
||||||
|
Loading…
Reference in New Issue
Block a user