Loading...
Searching...
No Matches
nimble_statconn.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2020 Freie Universität Berlin
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
50#ifndef NIMBLE_STATCONN_H
51#define NIMBLE_STATCONN_H
52
53#include <errno.h>
54#include <stdint.h>
55
56#include "nimble_netif.h"
57
58#ifdef __cplusplus
59extern "C" {
60#endif
61
65#ifndef NIMBLE_STATCONN_ADV_ITVL_MS
66#define NIMBLE_STATCONN_ADV_ITVL_MS (90U)
67#endif
68
72#ifndef NIMBLE_STATCONN_CONN_WIN_MS
73#define NIMBLE_STATCONN_CONN_WIN_MS (100U)
74#endif
75
79#ifndef NIMBLE_STATCONN_CONN_TIMEOUT_MS
80#define NIMBLE_STATCONN_CONN_TIMEOUT_MS (600U)
81#endif
82
90#ifndef NIMBLE_STATCONN_CONN_ITVL_MIN_MS
91#define NIMBLE_STATCONN_CONN_ITVL_MIN_MS (75U)
92#endif
93
98#ifndef NIMBLE_STATCONN_CONN_ITVL_MAX_MS
99#define NIMBLE_STATCONN_CONN_ITVL_MAX_MS (75U)
100#endif
101
105#ifndef NIMBLE_STATCONN_CONN_LATENCY
106#define NIMBLE_STATCONN_CONN_LATENCY (0)
107#endif
108
112#ifndef NIMBLE_STATCONN_CONN_SUPERTO_MS
113#define NIMBLE_STATCONN_CONN_SUPERTO_MS (2500U)
114#endif
115
120#ifndef NIMBLE_STATCONN_PHY_MODE
121#define NIMBLE_STATCONN_PHY_MODE NIMBLE_PHY_1M
122#endif
123
130
138
148
164int nimble_statconn_add_master(const uint8_t *addr,
165 const nimble_statconn_cfg_t *cfg);
166
179int nimble_statconn_add_slave(const uint8_t *addr,
180 const nimble_statconn_cfg_t *cfg);
181
190int nimble_statconn_rm(const uint8_t *addr);
191
192#ifdef __cplusplus
193}
194#endif
195
196#endif /* NIMBLE_STATCONN_H */
nimble_phy_t
BLE PHY modes.
Definition nimble_riot.h:75
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.