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

◆ ble_conn_state_conn_idx()

uint16_t ble_conn_state_conn_idx ( uint16_t conn_handle)

#include <ble_conn_state.h>

Translate a connection handle to a value that can be used as an array index.

Function for mapping connection handles onto the range <0 - MAX_CONNECTIONS>.

Note
The index will be the same as long as a connection is invalid. A subsequent connection with the same connection handle might have a different index.
Parameters
[in]conn_handleThe connection for which to retrieve an index.
Returns
An index unique to this connection. Or BLE_CONN_STATE_MAX_CONNECTIONS if conn_handle refers to an invalid connection.