mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
drivers/bmx280: refactor Kconfig model
This commit is contained in:
parent
347fb256d5
commit
7c5630032f
@ -5,20 +5,24 @@
|
||||
# directory for more details.
|
||||
#
|
||||
|
||||
menuconfig MODULE_BMX280
|
||||
bool "BMx280 Temperature, pressure and humidity sensors"
|
||||
depends on TEST_KCONFIG
|
||||
help
|
||||
The driver supports both BME280 and BMP280 connected either via SPI or
|
||||
I2C bus. Select one combination.
|
||||
|
||||
choice
|
||||
bool "Sensor variant"
|
||||
depends on MODULE_BMX280
|
||||
menuconfig MODULE_BMX280
|
||||
bool
|
||||
prompt "BMx280 Temperature, pressure and humidity sensors" if !(MODULE_SAUL_DEFAULT && HAVE_BMX280)
|
||||
default (MODULE_SAUL_DEFAULT && HAVE_BMX280)
|
||||
depends on TEST_KCONFIG
|
||||
|
||||
if MODULE_BMX280
|
||||
|
||||
choice BMX280_VARIANT
|
||||
bool "Model"
|
||||
default MODULE_BME280_I2C if HAVE_BME280_I2C
|
||||
default MODULE_BME280_SPI if HAVE_BME280_SPI
|
||||
default MODULE_BMP280_I2C if HAVE_BMP280_I2C
|
||||
default MODULE_BMP280_SPI if HAVE_BMP280_SPI
|
||||
help
|
||||
The driver supports both BME280 and BMP280 connected either via SPI or
|
||||
I2C bus. Select one combination.
|
||||
|
||||
config MODULE_BME280_I2C
|
||||
bool "BME280 on I2C"
|
||||
@ -46,26 +50,33 @@ config MODULE_BMP280_SPI
|
||||
|
||||
endchoice
|
||||
|
||||
endif # MODULE_BMX280
|
||||
|
||||
config HAVE_BME280_I2C
|
||||
bool
|
||||
select MODULE_BMX280 if MODULE_SAUL_DEFAULT
|
||||
select HAVE_BMX280
|
||||
help
|
||||
Indicates that a bme280 is present on the I2C bus.
|
||||
Indicates that a bme280 sensor on the I2C bus is present.
|
||||
|
||||
config HAVE_BME280_SPI
|
||||
bool
|
||||
select MODULE_BMX280 if MODULE_SAUL_DEFAULT
|
||||
select HAVE_BMX280
|
||||
help
|
||||
Indicates that a bme280 is present on the SPI bus.
|
||||
Indicates that a bme280 sensor on the SPI bus is present.
|
||||
|
||||
config HAVE_BMP280_I2C
|
||||
bool
|
||||
select MODULE_BMX280 if MODULE_SAUL_DEFAULT
|
||||
select HAVE_BMX280
|
||||
help
|
||||
Indicates that a bmp280 is present on the I2C bus.
|
||||
Indicates that a bmp280 sensor on the I2C bus is present.
|
||||
|
||||
config HAVE_BMP280_SPI
|
||||
bool
|
||||
select MODULE_BMX280 if MODULE_SAUL_DEFAULT
|
||||
select HAVE_BMX280
|
||||
help
|
||||
Indicates that a bmp280 is present on the SPI bus.
|
||||
Indicates that a bmp280 sensor on the SPI bus is present.
|
||||
|
||||
config HAVE_BMX280
|
||||
bool
|
||||
help
|
||||
Indicates that a bmx280 sensor is present.
|
||||
|
Loading…
Reference in New Issue
Block a user