File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed
subsys/softdevice_handler Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ No changes since the latest nRF Connect SDK Bare Metal release.
27
27
SoftDevice Handler
28
28
==================
29
29
30
+ * Added the :c:func: `nrf_sdh_ble_conn_handle_get ` function.
30
31
* Updated the system initialization to initialize on application level.
31
32
32
33
Boards
Original file line number Diff line number Diff line change @@ -106,6 +106,15 @@ static inline int nrf_sdh_ble_idx_get(uint16_t conn_handle)
106
106
return _nrf_sdh_ble_idx_get (conn_handle );
107
107
}
108
108
109
+ /**
110
+ * @brief Get the connection handle for an assigned index.
111
+ *
112
+ * @param[in] idx Assigned index.
113
+ *
114
+ * @returns The connection handle for the given index or @c BLE_CONN_HANDLE_INVALID if not found.
115
+ */
116
+ uint16_t nrf_sdh_ble_conn_handle_get (int idx );
117
+
109
118
#ifdef __cplusplus
110
119
}
111
120
#endif
Original file line number Diff line number Diff line change @@ -224,6 +224,15 @@ int _nrf_sdh_ble_idx_get(uint16_t conn_handle)
224
224
return -1 ;
225
225
}
226
226
227
+ uint16_t nrf_sdh_ble_conn_handle_get (int idx )
228
+ {
229
+ if (idx >= 0 && idx < ARRAY_SIZE (conn_handles )) {
230
+ return conn_handles [idx ];
231
+ }
232
+
233
+ return BLE_CONN_HANDLE_INVALID ;
234
+ }
235
+
227
236
static void idx_assign (uint16_t conn_handle )
228
237
{
229
238
__ASSERT (conn_handle != BLE_CONN_HANDLE_INVALID , "Got invalid conn_handle from SoftDevice" );
You can’t perform that action at this time.
0 commit comments