diff --git a/sys/Makefile.include b/sys/Makefile.include index f9c46b14ad..875f9c6bcd 100644 --- a/sys/Makefile.include +++ b/sys/Makefile.include @@ -101,6 +101,10 @@ ifneq (,$(filter riotboot,$(FEATURES_USED))) include $(RIOTBASE)/sys/riotboot/Makefile.include endif +ifneq (,$(filter skald, $(USEMODULE))) + include $(RIOTBASE)/sys/net/ble/skald/Makefile.include +endif + ifneq (,$(filter sock_async_event,$(USEMODULE))) include $(RIOTBASE)/sys/net/sock/async/event/Makefile.include endif diff --git a/sys/include/net/skald.h b/sys/include/net/skald.h index e955444e7b..e523965c70 100644 --- a/sys/include/net/skald.h +++ b/sys/include/net/skald.h @@ -65,70 +65,13 @@ extern "C" { #ifndef CONFIG_SKALD_INTERVAL_MS #define CONFIG_SKALD_INTERVAL_MS (1000U) #endif - -/** - * @brief Configure advertising channel 37 - * - * Set CONFIG_ADV_CH_37_DISABLE to disable channel 37 - */ -#ifdef DOXYGEN -#define CONFIG_ADV_CH_37_DISABLE -#endif - -/** - * @brief Configure advertising channel 38 - * - * Set CONFIG_ADV_CH_38_DISABLE to disable channel 38 - */ -#ifdef DOXYGEN -#define CONFIG_ADV_CH_38_DISABLE -#endif - -/** - * @brief Configure advertising channel 39 - * - * Set CONFIG_ADV_CH_39_DISABLE to disable channel 39 - */ -#ifdef DOXYGEN -#define CONFIG_ADV_CH_39_DISABLE -#endif /** @} */ -/** - * @brief Define advertising channel 37 if @ref CONFIG_ADV_CH_37_DISABLE is - * not set - */ -#if !defined(CONFIG_ADV_CH_37_DISABLE) || defined(DOXYGEN) -#define ADV_CH_37 37, -#else -#define ADV_CH_37 -#endif - -/** - * @brief Define advertising channel 38 if @ref CONFIG_ADV_CH_38_DISABLE is - * not set - */ -#if !defined(CONFIG_ADV_CH_38_DISABLE) || defined(DOXYGEN) -#define ADV_CH_38 38, -#else -#define ADV_CH_38 -#endif - -/** - * @brief Define advertising channel 39 if @ref CONFIG_ADV_CH_39_DISABLE is - * not set - */ -#if !defined(CONFIG_ADV_CH_39_DISABLE) || defined(DOXYGEN) -#define ADV_CH_39 39 -#else -#define ADV_CH_39 -#endif - /** * @brief List of advertising channels */ #ifndef SKALD_ADV_CHAN -#define SKALD_ADV_CHAN { ADV_CH_37 ADV_CH_38 ADV_CH_39 } +#define SKALD_ADV_CHAN { 37, 38, 39 } #endif /** diff --git a/sys/net/ble/skald/Makefile.include b/sys/net/ble/skald/Makefile.include new file mode 100644 index 0000000000..7f7b3ce7e9 --- /dev/null +++ b/sys/net/ble/skald/Makefile.include @@ -0,0 +1,5 @@ +# Parse kconfig symbol `CONFIG_SKALD_ADV_CHANNELS` to an ordered list +ifdef CONFIG_SKALD_ADV_CHANNELS + SKALD_ADV_CHAN := { $(shell echo $(CONFIG_SKALD_ADV_CHANNELS)) } + CFLAGS += -DSKALD_ADV_CHAN="$(SKALD_ADV_CHAN)" +endif