From b210da4ef86f7a6d5d0f04b6b509a181935f44ac Mon Sep 17 00:00:00 2001 From: Akshai M Date: Thu, 20 Aug 2020 18:28:07 +0530 Subject: [PATCH] net/skald : Enable configuration of 'SKALD_ADV_CHAN' Add macros to disable specific channels and move macros to 'CONFIG_' namespace --- sys/include/net/skald.h | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/sys/include/net/skald.h b/sys/include/net/skald.h index 60b15acb86..2670f55f0a 100644 --- a/sys/include/net/skald.h +++ b/sys/include/net/skald.h @@ -62,10 +62,31 @@ extern "C" { #endif /** - * @brief Static list of used advertising channels + * @brief Configure advertising channels + */ +#ifndef CONFIG_ADV_CH_37_DISABLE +#define ADV_CH_37 37, +#else +#define ADV_CH_37 +#endif + +#ifndef CONFIG_ADV_CH_38_DISABLE +#define ADV_CH_38 38, +#else +#define ADV_CH_38 +#endif + +#ifndef CONFIG_ADV_CH_39_DISABLE +#define ADV_CH_39 39 +#else +#define ADV_CH_39 +#endif + +/** + * @brief List of advertising channels */ #ifndef SKALD_ADV_CHAN -#define SKALD_ADV_CHAN { 37, 38, 39 } +#define SKALD_ADV_CHAN { ADV_CH_37 ADV_CH_38 ADV_CH_39 } #endif /**