Loading...
Searching...
No Matches
nimble_autoconn_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2019 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
26#ifndef NIMBLE_AUTOCONN_PERIOD_SCAN_MS
27#define NIMBLE_AUTOCONN_PERIOD_SCAN_MS (2000U) /* 2s */
28#endif
29#ifndef NIMBLE_AUTOCONN_PERIOD_ADV_MS
30#define NIMBLE_AUTOCONN_PERIOD_ADV_MS (10000U) /* 10s */
31#endif
32#ifndef NIMBLE_AUTOCONN_PERIOD_JITTER_MS
33#define NIMBLE_AUTOCONN_PERIOD_JITTER_MS (5000U) /* 0-5s */
34#endif
35
36#ifndef NIMBLE_AUTOCONN_ADV_ITVL_MS
37#define NIMBLE_AUTOCONN_ADV_ITVL_MS (100U) /* 100ms */
38#endif
39
40#ifndef NIMBLE_AUTOCONN_SCAN_ITVL_MS
41#define NIMBLE_AUTOCONN_SCAN_ITVL_MS (1500U) /* 1.5s */
42#endif
43#ifndef NIMBLE_AUTOCONN_SCAN_WIN_MS
44#define NIMBLE_AUTOCONN_SCAN_WIN_MS (110U) /* 110ms */
45#endif
46
47#ifndef NIMBLE_AUTOCONN_CONN_TIMEOUT_MS
48#define NIMBLE_AUTOCONN_CONN_TIMEOUT_MS (3 * NIMBLE_AUTOCONN_SCAN_WIN_MS)
49#endif
50#ifndef NIMBLE_AUTOCONN_CONN_ITVL_MIN_MS
51#define NIMBLE_AUTOCONN_CONN_ITVL_MIN_MS 75U /* 75ms */
52#endif
53#ifndef NIMBLE_AUTOCONN_CONN_ITVL_MAX_MS
54#define NIMBLE_AUTOCONN_CONN_ITVL_MAX_MS 75U /* 75ms */
55#endif
56#ifndef NIMBLE_AUTOCONN_CONN_LATENCY
57#define NIMBLE_AUTOCONN_CONN_LATENCY (0)
58#endif
59#ifndef NIMBLE_AUTOCONN_CONN_SVTO_MS
60#define NIMBLE_AUTOCONN_CONN_SVTO_MS (2500U) /* 2.5s */
61#endif
62
66#ifndef NIMBLE_AUTOCONN_PHY_MODE
67#define NIMBLE_AUTOCONN_PHY_MODE NIMBLE_PHY_1M
68#endif
69
70#ifndef NIMBLE_AUTOCONN_NODE_ID
71#define NIMBLE_AUTOCONN_NODE_ID "RIOT-autoconn"
72#endif
73
74#ifndef NIMBLE_AUTOCONN_PARAMS
75#define NIMBLE_AUTOCONN_PARAMS \
76 { .period_scan_ms = NIMBLE_AUTOCONN_PERIOD_SCAN_MS, \
77 .period_adv_ms = NIMBLE_AUTOCONN_PERIOD_ADV_MS, \
78 .period_jitter_ms = NIMBLE_AUTOCONN_PERIOD_JITTER_MS, \
79 .adv_itvl_ms = NIMBLE_AUTOCONN_ADV_ITVL_MS, \
80 .scan_itvl_ms = NIMBLE_AUTOCONN_SCAN_ITVL_MS, \
81 .scan_win_ms = NIMBLE_AUTOCONN_SCAN_WIN_MS, \
82 .conn_timeout_ms = NIMBLE_AUTOCONN_CONN_TIMEOUT_MS, \
83 .conn_itvl_min_ms = NIMBLE_AUTOCONN_CONN_ITVL_MIN_MS, \
84 .conn_itvl_max_ms = NIMBLE_AUTOCONN_CONN_ITVL_MAX_MS, \
85 .conn_latency = NIMBLE_AUTOCONN_CONN_LATENCY, \
86 .conn_super_to_ms = NIMBLE_AUTOCONN_CONN_SVTO_MS, \
87 .phy_mode = NIMBLE_AUTOCONN_PHY_MODE, \
88 .node_id = NIMBLE_AUTOCONN_NODE_ID, }
89#endif
91
96 NIMBLE_AUTOCONN_PARAMS;
97
98#ifdef __cplusplus
99}
100#endif
101
static const nimble_autoconn_params_t nimble_autoconn_params
nimble_netif_autoconn configuration
Set of configuration parameters needed to run autoconn.