Loading...
Searching...
No Matches
nimble_autoadv_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2022 Inria
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include "nimble_autoadv.h"
19#include "nimble_riot.h"
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
29#ifndef NIMBLE_AUTOADV_ADV_ITVL_MS
30#define NIMBLE_AUTOADV_ADV_ITVL_MS (100U) /* 100ms */
31#endif
32#ifndef NIMBLE_AUTOADV_ADV_DURATION_MS
33#define NIMBLE_AUTOADV_ADV_DURATION_MS (BLE_HS_FOREVER) /* forever */
34#endif
35#ifndef NIMBLE_AUTOADV_FLAGS
36#define NIMBLE_AUTOADV_FLAGS (NIMBLE_AUTOADV_FLAG_LEGACY | \
37 NIMBLE_AUTOADV_FLAG_CONNECTABLE | \
38 NIMBLE_AUTOADV_FLAG_SCANNABLE)
39#endif
40#ifndef NIMBLE_AUTOADV_PHY
41#define NIMBLE_AUTOADV_PHY NIMBLE_PHY_1M
42#endif
43#ifndef NIMBLE_AUTOADV_TX_POWER
44#define NIMBLE_AUTOADV_TX_POWER 0 /* 0dBm */
45#endif
46#ifndef NIMBLE_AUTOADV_CHANNEL_MAP
47#define NIMBLE_AUTOADV_CHANNEL_MAP 0
48#endif
49#ifndef NIMBLE_AUTOADV_OWN_ADDR_TYPE
50#define NIMBLE_AUTOADV_OWN_ADDR_TYPE 0xFF /* sets to nimble_riot_own_addr */
51#endif
52#ifndef NIMBLE_AUTOADV_FILTER_POLICY
53#define NIMBLE_AUTOADV_FILTER_POLICY 0
54#endif
55
56#ifndef NIMBLE_AUTOADV_PARAMS
57#define NIMBLE_AUTOADV_PARAMS \
58 { .adv_itvl_ms = NIMBLE_AUTOADV_ADV_ITVL_MS, \
59 .adv_duration_ms = NIMBLE_AUTOADV_ADV_DURATION_MS, \
60 .flags = NIMBLE_AUTOADV_FLAGS, \
61 .phy = NIMBLE_AUTOADV_PHY, \
62 .tx_power = NIMBLE_AUTOADV_TX_POWER, \
63 .channel_map = NIMBLE_AUTOADV_CHANNEL_MAP, \
64 .own_addr_type = NIMBLE_AUTOADV_OWN_ADDR_TYPE, \
65 .filter_policy = NIMBLE_AUTOADV_FILTER_POLICY }
66#endif
68
73 NIMBLE_AUTOADV_PARAMS;
74
75#ifdef __cplusplus
76}
77#endif
78
static const nimble_autoadv_cfg_t nimble_autoadv_cfg
nimble_autoadv configuration
RIOT specific glue functions for integrating NimBLE.
Parameter set used to configure accepting connections (advertising)