Loading...
Searching...
No Matches
nimble_statconn.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2020 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
48
49#include <errno.h>
50#include <stdint.h>
51
52#include "nimble_netif.h"
53
54#ifdef __cplusplus
55extern "C" {
56#endif
57
61#ifndef NIMBLE_STATCONN_ADV_ITVL_MS
62#define NIMBLE_STATCONN_ADV_ITVL_MS (90U)
63#endif
64
68#ifndef NIMBLE_STATCONN_CONN_WIN_MS
69#define NIMBLE_STATCONN_CONN_WIN_MS (100U)
70#endif
71
75#ifndef NIMBLE_STATCONN_CONN_TIMEOUT_MS
76#define NIMBLE_STATCONN_CONN_TIMEOUT_MS (600U)
77#endif
78
86#ifndef NIMBLE_STATCONN_CONN_ITVL_MIN_MS
87#define NIMBLE_STATCONN_CONN_ITVL_MIN_MS (75U)
88#endif
89
94#ifndef NIMBLE_STATCONN_CONN_ITVL_MAX_MS
95#define NIMBLE_STATCONN_CONN_ITVL_MAX_MS (75U)
96#endif
97
101#ifndef NIMBLE_STATCONN_CONN_LATENCY
102#define NIMBLE_STATCONN_CONN_LATENCY (0)
103#endif
104
108#ifndef NIMBLE_STATCONN_CONN_SUPERTO_MS
109#define NIMBLE_STATCONN_CONN_SUPERTO_MS (2500U)
110#endif
111
116#ifndef NIMBLE_STATCONN_PHY_MODE
117#define NIMBLE_STATCONN_PHY_MODE NIMBLE_PHY_1M
118#endif
119
126
134
144
160int nimble_statconn_add_master(const uint8_t *addr,
161 const nimble_statconn_cfg_t *cfg);
162
175int nimble_statconn_add_slave(const uint8_t *addr,
176 const nimble_statconn_cfg_t *cfg);
177
186int nimble_statconn_rm(const uint8_t *addr);
187
188#ifdef __cplusplus
189}
190#endif
191
nimble_phy_t
BLE PHY modes.
Definition nimble_riot.h:70
void(* nimble_netif_eventcb_t)(int handle, nimble_netif_event_t event, const uint8_t *addr)
Event callback signature used for asynchronous event signaling.
int nimble_statconn_add_master(const uint8_t *addr, const nimble_statconn_cfg_t *cfg)
Connect to peer (master) with a given address as slave.
int nimble_statconn_add_slave(const uint8_t *addr, const nimble_statconn_cfg_t *cfg)
Connect to a peer (slave) with a given address as master.
int nimble_statconn_rm(const uint8_t *addr)
Remove the connection to the given peer.
void nimble_statconn_init(void)
Initialize the statconn module.
void nimble_statconn_eventcb(nimble_netif_eventcb_t cb)
Register a callback that is called on netif events.
GNRC netif implementation for NimBLE.
Statconn connection parameters.
nimble_phy_t phy_mode
BLE PHY mode used for the connection.