1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 04:52:59 +01:00

drivers/stmpe811: don't use a choice to select the bus

This commit is contained in:
Alexandre Abadie 2022-01-01 16:48:47 +01:00
parent 3a80354d92
commit 8e56da3658
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
2 changed files with 31 additions and 21 deletions

View File

@ -5,8 +5,10 @@
# directory for more details.
#
config MODULE_STMPE811
menuconfig MODULE_STMPE811
bool
prompt "STMPE811 Touchscreen Controller" if !(MODULE_TOUCH_DEV && HAVE_STMPE811)
default (MODULE_TOUCH_DEV && HAVE_STMPE811)
depends on HAS_PERIPH_GPIO
depends on HAS_PERIPH_GPIO_IRQ
depends on TEST_KCONFIG
@ -15,36 +17,44 @@ config MODULE_STMPE811
select MODULE_ZTIMER
select MODULE_ZTIMER_MSEC
config HAVE_STMPE811_I2C
bool
select MODULE_STMPE811_I2C if MODULE_TOUCH_DEV
help
Indicates that an STMPE811 over I2C touch panel is present.
if MODULE_STMPE811
config HAVE_STMPE811_SPI
bool
select MODULE_STMPE811_SPI if MODULE_TOUCH_DEV
choice STMPE811_VARIANT
bool "Model"
default MODULE_STMPE811_I2C if HAVE_STMPE811_I2C
default MODULE_STMPE811_SPI if HAVE_STMPE811_SPI
help
Indicates that an STMPE811 over SPI touch panel is present.
choice
bool "STMPE811 Touchscreen Controller"
optional
depends on TEST_KCONFIG
help
The driver supports both STMPE811 connected either via SPI or
The driver supports both stmpe811 connected either via SPI or
I2C bus. Select one combination.
config MODULE_STMPE811_I2C
bool "STMPE811 on I2C"
depends on HAS_PERIPH_I2C
select MODULE_PERIPH_I2C
select MODULE_STMPE811
config MODULE_STMPE811_SPI
bool "STMPE811 on SPI"
depends on HAS_PERIPH_SPI
depends on HAS_PERIPH_GPIO
select MODULE_PERIPH_SPI
select MODULE_STMPE811
select MODULE_PERIPH_GPIO
endchoice
endif # MODULE_STMPE811
config HAVE_STMPE811
bool
help
Indicates that an STMPE811 is present.
config HAVE_STMPE811_I2C
bool
select HAVE_STMPE811
help
Indicates that an STMPE811 over I2C touch panel is present.
config HAVE_STMPE811_SPI
bool
select HAVE_STMPE811
help
Indicates that an STMPE811 over SPI touch panel is present.

View File

@ -1,3 +1,3 @@
# this file enables modules defined in Kconfig. Do not use this file for
# application configuration. This is only needed during migration.
CONFIG_MODULE_STMPE811_I2C=y
CONFIG_MODULE_STMPE811=y