ble_gap_set_event_cb() function
Configures a connection to use the specified GAP event callback. A connection's GAP event callback is first specified when the connection is created, either via advertising or initiation. This function replaces the callback that was last configured.
Arguments
conn_handle
The handle of the connection to configure.
cb
The callback to associate with the connection.
cb_arg
An optional argument that the callback receives.
Return value
0 on success, BLE_HS_ENOTCONN if there is no connection with the specified handle.