nRF Connect SDK Bare Metal API 2.0.99
Loading...
Searching...
No Matches

◆ nrf_sdh_ble_idx_get()

int nrf_sdh_ble_idx_get ( uint16_t conn_handle)

#include <nrf_sdh_ble.h>

Get the assigned index for a connection handle.

The returned value can be used for indexing into arrays where each element is associated with a specific connection. Connection handles should never directly be used for indexing arrays.

Parameters
[in]conn_handleConnection handle.
Returns
An integer in the range from 0 to (CONFIG_NRF_SDH_BLE_TOTAL_LINK_COUNT - 1) if the connection handle has been assigned to an index, otherwise -1.