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

◆ bt_conn_ctx_get_by_id()

const struct bt_conn_ctx * bt_conn_ctx_get_by_id ( struct bt_conn_ctx_lib ctx_lib,
uint8_t  id 
)

#include <include/bluetooth/conn_ctx.h>

Get a specific connection context from the memory pool.

This function finds the connection context and the associated connection object in the memory pool. The link to find is identified by its index in the connection context array.

This function should be used in conjunction with bt_conn_ctx_release to ensure proper operation.

Parameters
ctx_libBluetooth connection context library instance.
idConnection context index.
Returns
Pointer to the Bluetooth connection context library API struct if the operation was successful. Otherwise NULL.