net/skald : Move 'SKALD_INTERVAL' to 'CONFIG_'
This commit is contained in:
parent
a0bae383d7
commit
4219036727
@ -20,7 +20,7 @@
|
|||||||
* # Design Decisions and Limitations
|
* # Design Decisions and Limitations
|
||||||
* - support for local addresses only (using `luid` to generate them)
|
* - support for local addresses only (using `luid` to generate them)
|
||||||
* - advertising interval is configured during compile time, override by setting
|
* - 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
|
* - advertising channels are configured during compile time, override by
|
||||||
* setting `CFLAGS+=-DSKALD_ADV_CHAN={37,39}`
|
* setting `CFLAGS+=-DSKALD_ADV_CHAN={37,39}`
|
||||||
*
|
*
|
||||||
@ -55,10 +55,10 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Static advertising interval
|
* @brief Default static advertising interval
|
||||||
*/
|
*/
|
||||||
#ifndef SKALD_INTERVAL
|
#ifndef CONFIG_SKALD_INTERVAL
|
||||||
#define SKALD_INTERVAL (1 * US_PER_SEC)
|
#define CONFIG_SKALD_INTERVAL (1 * US_PER_SEC)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -93,7 +93,7 @@ void skald_init(void);
|
|||||||
/**
|
/**
|
||||||
* @brief Start advertising the given packet
|
* @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).
|
* each of the defined advertising channels (see SKALD_ADV_CHAN).
|
||||||
*
|
*
|
||||||
* @param[in,out] ctx start advertising this context
|
* @param[in,out] ctx start advertising this context
|
||||||
|
|||||||
@ -63,7 +63,7 @@ static void _stop_radio(void)
|
|||||||
|
|
||||||
static void _sched_next(skald_ctx_t *ctx)
|
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
|
/* schedule next advertising event, adding a random jitter between
|
||||||
* 0ms and 10ms (see spec v5.0-vol6-b-4.4.2.2.1) */
|
* 0ms and 10ms (see spec v5.0-vol6-b-4.4.2.2.1) */
|
||||||
ctx->last += random_uint32_range(JITTER_MIN, JITTER_MAX);
|
ctx->last += random_uint32_range(JITTER_MIN, JITTER_MAX);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user