diff --git a/drivers/sx127x/Kconfig b/drivers/sx127x/Kconfig index cf51ea364b..0af68723af 100644 --- a/drivers/sx127x/Kconfig +++ b/drivers/sx127x/Kconfig @@ -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. diff --git a/tests/driver_sx127x/app.config.test b/tests/driver_sx127x/app.config.test index cb42f782db..ef321ba62d 100644 --- a/tests/driver_sx127x/app.config.test +++ b/tests/driver_sx127x/app.config.test @@ -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