From 4219036727a02d613ab377372eca6ba79cb29d9c Mon Sep 17 00:00:00 2001 From: Akshai M Date: Thu, 20 Aug 2020 18:01:08 +0530 Subject: [PATCH] net/skald : Move 'SKALD_INTERVAL' to 'CONFIG_' --- sys/include/net/skald.h | 10 +++++----- sys/net/ble/skald/skald.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/include/net/skald.h b/sys/include/net/skald.h index ce5e0131ac..60b15acb86 100644 --- a/sys/include/net/skald.h +++ b/sys/include/net/skald.h @@ -20,7 +20,7 @@ * # Design Decisions and Limitations * - support for local addresses only (using `luid` to generate them) * - advertising interval is configured during compile time, override by setting - * `CFLAGS+=-DSKALD_INTERVAL=xxx` + * `CFLAGS+=-DCONFIG_SKALD_INTERVAL=xxx` * - advertising channels are configured during compile time, override by * setting `CFLAGS+=-DSKALD_ADV_CHAN={37,39}` * @@ -55,10 +55,10 @@ extern "C" { #endif /** - * @brief Static advertising interval + * @brief Default static advertising interval */ -#ifndef SKALD_INTERVAL -#define SKALD_INTERVAL (1 * US_PER_SEC) +#ifndef CONFIG_SKALD_INTERVAL +#define CONFIG_SKALD_INTERVAL (1 * US_PER_SEC) #endif /** @@ -93,7 +93,7 @@ void skald_init(void); /** * @brief Start advertising the given packet * - * The packet will be send out each advertising interval (see SKALD_INTERVAL) on + * The packet will be send out each advertising interval (see CONFIG_SKALD_INTERVAL) on * each of the defined advertising channels (see SKALD_ADV_CHAN). * * @param[in,out] ctx start advertising this context diff --git a/sys/net/ble/skald/skald.c b/sys/net/ble/skald/skald.c index 2ff47a3dcc..c8eabc24c4 100644 --- a/sys/net/ble/skald/skald.c +++ b/sys/net/ble/skald/skald.c @@ -63,7 +63,7 @@ static void _stop_radio(void) static void _sched_next(skald_ctx_t *ctx) { - ctx->last += SKALD_INTERVAL; + ctx->last += CONFIG_SKALD_INTERVAL; /* schedule next advertising event, adding a random jitter between * 0ms and 10ms (see spec v5.0-vol6-b-4.4.2.2.1) */ ctx->last += random_uint32_range(JITTER_MIN, JITTER_MAX);