ble_gap_set_event_cb

int
ble_gap_set_event_cb(
            uint16_t  conn_handle,
    ble_gap_event_fn *cb,
                void *cb_arg
)

Description

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.

Parameters

ParameterDescription
conn_handleThe handle of the connection to configure.
cbThe callback to associate with the connection.
cb_argAn optional argument that the callback receives.

Returned values

ValueCondition
0Success.
BLE_HS_ENOTCONNThere is no connection with the specified handle.