1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/sx127x/kconfig: rework modelling

This commit is contained in:
Leandro Lanzieri 2021-11-25 10:37:33 +01:00
parent 398df91a99
commit e44ff31560
No known key found for this signature in database
GPG Key ID: F4E9A721761C7593
2 changed files with 39 additions and 28 deletions

View File

@ -5,41 +5,52 @@
# directory for more details.
#
if TEST_KCONFIG
choice
bool "Semtech SX1272 and SX1276 radios driver"
optional
menuconfig MODULE_SX127X
bool "Semtech SX1272 and SX1276 radios driver" if !(HAVE_SX127X && MODULE_NETDEV_DEFAULT)
default y if (HAVE_SX127X && MODULE_NETDEV_DEFAULT)
depends on TEST_KCONFIG
depends on HAS_PERIPH_GPIO
depends on HAS_PERIPH_GPIO_IRQ
depends on HAS_PERIPH_SPI
depends on HAS_PERIPH_TIMER
help
Only LoRa long range modem is supported at the moment.
config MODULE_SX1272
bool "SX1272"
select MODULE_SX127X
config MODULE_SX1276
bool "SX1276"
select MODULE_SX127X
endchoice
config MODULE_SX127X
bool
depends on HAS_PERIPH_GPIO
depends on HAS_PERIPH_GPIO_IRQ
depends on HAS_PERIPH_SPI
select MODULE_IOLIST
select MODULE_LORA
select MODULE_PERIPH_GPIO
select MODULE_PERIPH_GPIO_IRQ
select MODULE_PERIPH_SPI_GPIO_MODE if HAS_PERIPH_SPI_GPIO_MODE
select MODULE_PERIPH_SPI
select MODULE_ZTIMER
select MODULE_ZTIMER_MSEC
select MODULE_IOLIST
select MODULE_LORA
help
Only LoRa long range modem is supported at the moment.
endif # TEST_KCONFIG
choice
bool "Radio variant"
depends on MODULE_SX127X
default MODULE_SX1272 if HAVE_SX1272
default MODULE_SX1276 if HAVE_SX1276
config MODULE_SX1272
bool "SX1272"
config MODULE_SX1276
bool "SX1276"
endchoice
config HAVE_SX1272
bool
select HAVE_SX127X
help
Indicates that an sx1272 radio is present.
config HAVE_SX1276
bool
select HAVE_SX127X
help
Indicates that an sx1276 radio is present.
config HAVE_SX127X
bool
help
Indicates that an sx127x radio is present.

View File

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