diff --git a/src/Kconfig b/src/Kconfig index 13e848f15488..168572729fa9 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -100,23 +100,15 @@ config WANT_THERMOCOUPLE bool depends on HAVE_GPIO_SPI default y -config WANT_SENSOR_ADXL345 +config WANT_ADXL345 bool depends on HAVE_GPIO_SPI default y -config WANT_SENSOR_ANGLE - bool - depends on HAVE_GPIO_SPI - default y -config WANT_SENSOR_MPU9250 - bool - depends on HAVE_GPIO_I2C - default y config WANT_LIS2DW bool depends on HAVE_GPIO_SPI || HAVE_GPIO_I2C default y -config WANT_LDC1612 +config WANT_MPU9250 bool depends on HAVE_GPIO_I2C default y @@ -128,6 +120,14 @@ config WANT_ADS1220 bool depends on HAVE_GPIO_SPI default y +config WANT_LDC1612 + bool + depends on HAVE_GPIO_I2C + default y +config WANT_SENSOR_ANGLE + bool + depends on HAVE_GPIO_SPI + default y config WANT_SOFTWARE_I2C bool depends on HAVE_GPIO && HAVE_GPIO_I2C @@ -138,10 +138,8 @@ config WANT_SOFTWARE_SPI default y config NEED_SENSOR_BULK bool - depends on WANT_LIS2DW || WANT_LDC1612 || WANT_HX71X \ - || WANT_ADS1220 || WANT_THERMOCOUPLE \ - || WANT_SENSOR_ADXL345 || WANT_SENSOR_ANGLE \ - || WANT_SENSOR_MPU9250 + depends on WANT_ADXL345 || WANT_LIS2DW || WANT_MPU9250 \ + || WANT_HX71X || WANT_ADS1220 || WANT_LDC1612 || WANT_SENSOR_ANGLE default y menu "Optional features (to reduce code size)" depends on HAVE_LIMITED_CODE_SIZE @@ -154,20 +152,14 @@ config WANT_DISPLAYS config WANT_THERMOCOUPLE bool "Support thermocouple MAX sensors" depends on HAVE_GPIO_SPI -config WANT_SENSOR_ADXL345 +config WANT_ADXL345 bool "Support adxl accelerometers" depends on HAVE_GPIO_SPI -config WANT_SENSOR_ANGLE - bool "Support angle sensors" - depends on HAVE_GPIO_SPI -config WANT_SENSOR_MPU9250 - bool "Support MPU accelerometers" - depends on HAVE_GPIO_I2C config WANT_LIS2DW bool "Support lis2dw and lis3dh 3-axis accelerometers" depends on HAVE_GPIO_SPI || HAVE_GPIO_I2C -config WANT_LDC1612 - bool "Support ldc1612 eddy current sensor" +config WANT_MPU9250 + bool "Support MPU accelerometers" depends on HAVE_GPIO_I2C config WANT_HX71X bool "Support HX711 and HX717 ADC chips" @@ -175,6 +167,12 @@ config WANT_HX71X config WANT_ADS1220 bool "Support ADS 1220 ADC chip" depends on HAVE_GPIO_SPI +config WANT_LDC1612 + bool "Support ldc1612 eddy current sensor" + depends on HAVE_GPIO_I2C +config WANT_SENSOR_ANGLE + bool "Support angle sensors" + depends on HAVE_GPIO_SPI config WANT_SOFTWARE_I2C bool "Support software based I2C \"bit-banging\"" depends on HAVE_GPIO && HAVE_GPIO_I2C diff --git a/src/Makefile b/src/Makefile index 278f265eb072..a0ca02b9e087 100644 --- a/src/Makefile +++ b/src/Makefile @@ -14,15 +14,12 @@ src-$(CONFIG_WANT_GPIO_BITBANGING) += buttons.c tmcuart.c neopixel.c \ src-$(CONFIG_WANT_DISPLAYS) += lcd_st7920.c lcd_hd44780.c src-$(CONFIG_WANT_SOFTWARE_SPI) += spi_software.c src-$(CONFIG_WANT_SOFTWARE_I2C) += i2c_software.c -src-thermocouple-$(CONFIG_WANT_THERMOCOUPLE) := thermocouple.c -src-adxl345-$(CONFIG_WANT_SENSOR_ADXL345) := sensor_adxl345.c -src-angle-$(CONFIG_WANT_SENSOR_ANGLE) := sensor_angle.c -src-mpu9250-$(CONFIG_WANT_SENSOR_MPU9250) := sensor_mpu9250.c -src-$(CONFIG_HAVE_GPIO_SPI) += $(src-thermocouple-y) $(src-adxl345-y) \ - $(src-angle-y) -src-$(CONFIG_HAVE_GPIO_I2C) += $(src-mpu9250-y) +src-$(CONFIG_WANT_THERMOCOUPLE) += thermocouple.c +src-$(CONFIG_WANT_ADXL345) += sensor_adxl345.c src-$(CONFIG_WANT_LIS2DW) += sensor_lis2dw.c -src-$(CONFIG_WANT_LDC1612) += sensor_ldc1612.c +src-$(CONFIG_WANT_MPU9250) += sensor_mpu9250.c src-$(CONFIG_WANT_HX71X) += sensor_hx71x.c src-$(CONFIG_WANT_ADS1220) += sensor_ads1220.c +src-$(CONFIG_WANT_LDC1612) += sensor_ldc1612.c +src-$(CONFIG_WANT_SENSOR_ANGLE) += sensor_angle.c src-$(CONFIG_NEED_SENSOR_BULK) += sensor_bulk.c