nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ BT_CONN_CTX_DEF

#define BT_CONN_CTX_DEF ( _name,
_max_clients,
_ctx_sz )

#include <include/bluetooth/conn_ctx.h>

Value:
K_MEM_SLAB_DEFINE(_name##_mem_slab, \
ROUND_UP(_ctx_sz, CONFIG_BT_CONN_CTX_MEM_BUF_ALIGN), \
(_max_clients), \
CONFIG_BT_CONN_CTX_MEM_BUF_ALIGN); \
K_MUTEX_DEFINE(_name##_mutex); \
static struct bt_conn_ctx_lib _CONCAT(_name, _ctx_lib) = \
{ \
.mem_slab = &_CONCAT(_name, _mem_slab), \
.mutex = &_name##_mutex \
}
Bluetooth connection context library structure.
Definition conn_ctx.h:53

Macro for defining a Bluetooth connection context library instance.

Parameters
_nameName of the instance.
_max_clientsMaximum number of clients connected at a time.
_ctx_szContext size in bytes for a single connection.