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

Merge pull request #15790 from akshaim/Kconfig_skald_update

net/skald: Update Kconfig implementation
This commit is contained in:
Leandro Lanzieri 2021-01-26 20:46:27 +01:00 committed by GitHub
commit 434b6b68d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 66 deletions

View File

@ -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

View File

@ -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
/**

View File

@ -19,13 +19,11 @@ config SKALD_INTERVAL_MS
Configure advertising interval in milliseconds. Default value is 1
second which is 1000 milliseconds.
config ADV_CH_37_DISABLE
bool "Disable advertising on channel 37"
config ADV_CH_38_DISABLE
bool "Disable advertising on channel 38"
config ADV_CH_39_DISABLE
bool "Disable advertising on channel 39"
config SKALD_ADV_CHANNELS
string "Advertising channels"
default "37, 38, 39"
help
Configure advertising channels. Default advertising channels are 37, 38
and 39 which can be customised to upto 40 (0-39) channels.
endif # KCONFIG_USEMODULE_SKALD

View File

@ -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