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

◆ bt_fast_pair_fhn_pf_ble_cs_ranging_config_decode()

int bt_fast_pair_fhn_pf_ble_cs_ranging_config_decode ( const struct bt_fast_pair_fhn_pf_ranging_tech_payload * config_payload,
struct bt_fast_pair_fhn_pf_ble_cs_ranging_config * config_desc )

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

Decode a technology-specific payload into a descriptor of the BLE CS technology ranging configuration.

This function decodes the technology-specific payload, described by the bt_fast_pair_fhn_pf_ranging_tech_payload structure, into the bt_fast_pair_fhn_pf_ble_cs_ranging_config descriptor.

The decoding process is successful if the config_payload contains valid BLE CS configuration data. For instance, the bt_fast_pair_fhn_pf_ranging_tech_payload::id field must be set to BT_FAST_PAIR_FHN_PF_RANGING_TECH_ID_BLE_CS.

This function can be called from any context.

Parameters
config_payloadTechnology-specific payload that describes the BLE CS technology ranging configuration.
config_descBLE CS ranging configuration descriptor to write the decoded data into.
Returns
0 if the operation was successful. Otherwise, a (negative) error code is returned.