nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches

◆ bt_fast_pair_fhn_pf_ranging_mgmt_cb_register()

int bt_fast_pair_fhn_pf_ranging_mgmt_cb_register ( const struct bt_fast_pair_fhn_pf_ranging_mgmt_cb * cb)

#include <include/bluetooth/fast_pair/fhn/pf/pf.h>

Register ranging management callbacks.

This function registers the ranging management callbacks that are used to communicate with the peer device to negotiate supported ranging technologies, and to configure, start or stop a ranging session.

If the

CONFIG_BT_FAST_PAIR_FHN_PF 

Kconfig option is enabled, you must call this API before you enable Fast Pair with the bt_fast_pair_enable function. Otherwise, the enable operation fails.

All callbacks in the bt_fast_pair_fhn_pf_ranging_mgmt_cb structure, except for the bt_fast_pair_fhn_pf_ranging_mgmt_cb::comm_channel_terminated callback, must be non-NULL.

You can call this function only in the disabled state of the Fast Pair module (see bt_fast_pair_is_ready function).

This function must be called in the cooperative thread context or in the system initialization context (SYS_INIT macro).

Parameters
cbRanging management callback structure.
Returns
0 if the operation was successful. Otherwise, a (negative) error code is returned.