mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
net/skald : Move 'SKALD_INTERVAL' to 'CONFIG_'
This commit is contained in:
parent
a0bae383d7
commit
4219036727
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user