Skip to content

Commit

Permalink
Kconfig: Support Enable/Disable lis2dw on chips with small flash size
Browse files Browse the repository at this point in the history
Signed-off-by: Alan.Ma from BigTreeTech [email protected]
  • Loading branch information
bigtreetech committed Aug 17, 2023
1 parent c58d56e commit 6d7e210
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ config WANT_SENSORS
bool
depends on HAVE_GPIO_I2C || HAVE_GPIO_SPI
default y
config WANT_LIS2DW
bool
depends on HAVE_GPIO_SPI
default y
config WANT_SOFTWARE_I2C
bool
depends on HAVE_GPIO && HAVE_GPIO_I2C
Expand All @@ -119,6 +123,9 @@ config WANT_DISPLAYS
config WANT_SENSORS
bool "Support external sensor devices"
depends on HAVE_GPIO_I2C || HAVE_GPIO_SPI
config WANT_LIS2DW
bool "Support lis2dw 3-axis accelerometer"
depends on HAVE_GPIO_SPI
config WANT_SOFTWARE_I2C
bool "Support software based I2C \"bit-banging\""
depends on HAVE_GPIO && HAVE_GPIO_I2C
Expand Down
3 changes: 2 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ 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
sensors-src-$(CONFIG_HAVE_GPIO_SPI) := thermocouple.c sensor_adxl345.c \
sensor_angle.c sensor_lis2dw.c
sensor_angle.c
src-$(CONFIG_WANT_LIS2DW) += sensor_lis2dw.c
sensors-src-$(CONFIG_HAVE_GPIO_I2C) += sensor_mpu9250.c
src-$(CONFIG_WANT_SENSORS) += $(sensors-src-y)
1 change: 1 addition & 0 deletions test/configs/ar100.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ CONFIG_MACH_AR100=y
CONFIG_WANT_DISPLAYS=n
CONFIG_WANT_SOFTWARE_I2C=n
CONFIG_WANT_SOFTWARE_SPI=n
CONFIG_WANT_LIS2DW=n
1 change: 1 addition & 0 deletions test/configs/stm32f042.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
CONFIG_MACH_STM32=y
CONFIG_MACH_STM32F042=y
CONFIG_WANT_SOFTWARE_I2C=n
CONFIG_WANT_LIS2DW=n

0 comments on commit 6d7e210

Please sign in to comment.