mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
net/skald : Add CONFIG_SKALD_ADV_CHANNELS
to allow ordered list
Added `CONFIG_SKALD_ADV_CHANNELS` which is then parsed to and ordered list `SKALD_ADV_CHAN` Co-authored-by: Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de>
This commit is contained in:
parent
8e47621e7c
commit
f7aff3c0aa
@ -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
|
||||
|
@ -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
|
||||
|
||||
/**
|
||||
|
5
sys/net/ble/skald/Makefile.include
Normal file
5
sys/net/ble/skald/Makefile.include
Normal 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
|
Loading…
Reference in New Issue
Block a user