Zephyr Project API 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
direction.h File Reference
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  bt_df_adv_cte_tx_param
 Constant Tone Extension parameters for connectionless transmission. More...
 
struct  bt_df_per_adv_sync_cte_rx_param
 Constant Tone Extension parameters for connectionless reception. More...
 
struct  bt_df_per_adv_sync_iq_samples_report
 
struct  bt_df_conn_cte_rx_param
 
struct  bt_df_conn_iq_samples_report
 
struct  bt_df_conn_cte_tx_param
 Constant Tone Extension parameters for CTE transmission in connected mode. More...
 
struct  bt_df_conn_cte_req_params
 

Enumerations

enum  bt_df_cte_type {
  BT_DF_CTE_TYPE_NONE = 0 , BT_DF_CTE_TYPE_AOA = BIT(0) , BT_DF_CTE_TYPE_AOD_1US = BIT(1) , BT_DF_CTE_TYPE_AOD_2US = BIT(2) ,
  BT_DF_CTE_TYPE_ALL = (BT_DF_CTE_TYPE_AOA | BT_DF_CTE_TYPE_AOD_1US | BT_DF_CTE_TYPE_AOD_2US)
}
 Constant Tone Extension (CTE) types. More...
 
enum  bt_df_antenna_switching_slot { BT_DF_ANTENNA_SWITCHING_SLOT_1US = 0x1 , BT_DF_ANTENNA_SWITCHING_SLOT_2US = 0x2 }
 Allowed antenna switching slots: 1 us or 2 us. More...
 
enum  bt_df_packet_status { BT_DF_CTE_CRC_OK = 0x0 , BT_DF_CTE_CRC_ERR_CTE_BASED_TIME = 0x1 , BT_DF_CTE_CRC_ERR_CTE_BASED_OTHER = 0x2 , BT_DF_CTE_INSUFFICIENT_RESOURCES = 0xFF }
 Possible statuses of PDU that contained reported CTE. More...
 
enum  bt_df_iq_sample { BT_DF_IQ_SAMPLE_8_BITS_INT , BT_DF_IQ_SAMPLE_16_BITS_INT }
 
enum  bt_df_conn_iq_report_err { BT_DF_IQ_REPORT_ERR_SUCCESS , BT_DF_IQ_REPORT_ERR_NO_CTE , BT_DF_IQ_REPORT_ERR_PEER_REJECTED }
 

Functions

int bt_df_set_adv_cte_tx_param (struct bt_le_ext_adv *adv, const struct bt_df_adv_cte_tx_param *params)
 Set or update the Constant Tone Extension parameters for periodic advertising set.
 
int bt_df_adv_cte_tx_enable (struct bt_le_ext_adv *adv)
 Enable transmission of Constant Tone Extension for the given advertising set.
 
int bt_df_adv_cte_tx_disable (struct bt_le_ext_adv *adv)
 Disable transmission of Constant Tone Extension for the given advertising set.
 
int bt_df_per_adv_sync_cte_rx_enable (struct bt_le_per_adv_sync *sync, const struct bt_df_per_adv_sync_cte_rx_param *params)
 Enable receive and sampling of Constant Tone Extension for the given sync set.
 
int bt_df_per_adv_sync_cte_rx_disable (struct bt_le_per_adv_sync *sync)
 Disable receive and sampling of Constant Tone Extension for the given sync set.
 
int bt_df_conn_cte_rx_enable (struct bt_conn *conn, const struct bt_df_conn_cte_rx_param *params)
 Enable receive and sampling of Constant Tone Extension for the connection object.
 
int bt_df_conn_cte_rx_disable (struct bt_conn *conn)
 Disable receive and sampling of Constant Tone Extension for the connection object.
 
int bt_df_set_conn_cte_tx_param (struct bt_conn *conn, const struct bt_df_conn_cte_tx_param *params)
 Set Constant Tone Extension transmission parameters for a connection.
 
int bt_df_conn_cte_req_enable (struct bt_conn *conn, const struct bt_df_conn_cte_req_params *params)
 Enable Constant Tone Extension request procedure for a connection.
 
int bt_df_conn_cte_req_disable (struct bt_conn *conn)
 Disable Constant Tone Extension request procedure for a connection.
 
int bt_df_conn_cte_rsp_enable (struct bt_conn *conn)
 Enable Constant Tone Extension response procedure for a connection.
 
int bt_df_conn_cte_rsp_disable (struct bt_conn *conn)
 Disable Constant Tone Extension response procedure for a connection.
 

Enumeration Type Documentation

◆ bt_df_antenna_switching_slot

Allowed antenna switching slots: 1 us or 2 us.

Enumerator
BT_DF_ANTENNA_SWITCHING_SLOT_1US 
BT_DF_ANTENNA_SWITCHING_SLOT_2US 

◆ bt_df_conn_iq_report_err

Enumerator
BT_DF_IQ_REPORT_ERR_SUCCESS 

IQ samples report received successfully.

BT_DF_IQ_REPORT_ERR_NO_CTE 

Received PDU without CTE.

No valid data in report.

BT_DF_IQ_REPORT_ERR_PEER_REJECTED 

Peer rejected CTE request.

No valid data in report.

◆ bt_df_cte_type

Constant Tone Extension (CTE) types.

Enumerator
BT_DF_CTE_TYPE_NONE 

Convenience value for purposes where non of CTE types is allowed.

BT_DF_CTE_TYPE_AOA 

Angle of Arrival mode.

Antenna switching done on receiver site.

BT_DF_CTE_TYPE_AOD_1US 

Angle of Departure mode with 1 us antenna switching slots.

Antenna switching done on transmitter site.

BT_DF_CTE_TYPE_AOD_2US 

Angle of Departure mode with 2 us antenna switching slots.

Antenna switching done on transmitter site.

BT_DF_CTE_TYPE_ALL 

Convenience value that collects all possible CTE types in one entry.

◆ bt_df_iq_sample

Enumerator
BT_DF_IQ_SAMPLE_8_BITS_INT 

Reported IQ samples have 8 bits signed integer format.

Size defined in BT Core 5.3 Vol 4, Part E sections 7.7.65.21 and 7.7.65.22.

BT_DF_IQ_SAMPLE_16_BITS_INT 

Reported IQ samples have 16 bits signed integer format.

Vendor specific extension.

◆ bt_df_packet_status

Possible statuses of PDU that contained reported CTE.

Enumerator
BT_DF_CTE_CRC_OK 

Received PDU had CRC OK.

BT_DF_CTE_CRC_ERR_CTE_BASED_TIME 

Received PDU had incorrect CRC, but Radio peripheral was able to parse CTEInfo field of the PDU and process sampling of CTE.

BT_DF_CTE_CRC_ERR_CTE_BASED_OTHER 

Received PDU had incorrect CRC, but Radio peripheral was able to process sampling of CTE in some other way.

BT_DF_CTE_INSUFFICIENT_RESOURCES 

There were no sufficient resources to sample CTE.

Function Documentation

◆ bt_df_adv_cte_tx_disable()

int bt_df_adv_cte_tx_disable ( struct bt_le_ext_adv *  adv)

Disable transmission of Constant Tone Extension for the given advertising set.

Parameters
[in]advAdvertising set object.
Returns
Zero on success or (negative) error code otherwise.

◆ bt_df_adv_cte_tx_enable()

int bt_df_adv_cte_tx_enable ( struct bt_le_ext_adv *  adv)

Enable transmission of Constant Tone Extension for the given advertising set.

Transmission of Constant Tone Extension may be enabled only after setting periodic advertising parameters (bt_le_per_adv_set_param) and Constant Tone Extension parameters (bt_df_set_adv_cte_tx_param).

Parameters
[in]advAdvertising set object.
Returns
Zero on success or (negative) error code otherwise.

◆ bt_df_conn_cte_req_disable()

int bt_df_conn_cte_req_disable ( struct bt_conn *  conn)

Disable Constant Tone Extension request procedure for a connection.

The function is available if

CONFIG_BT_DF_CONNECTION_CTE_REQ 

is enabled.

Parameters
connConnection object.
Returns
Zero in case of success, other value in case of failure.

◆ bt_df_conn_cte_req_enable()

int bt_df_conn_cte_req_enable ( struct bt_conn *  conn,
const struct bt_df_conn_cte_req_params params 
)

Enable Constant Tone Extension request procedure for a connection.

The function is available if

CONFIG_BT_DF_CONNECTION_CTE_REQ 

is enabled.

Parameters
connConnection object.
paramsCTE receive and sampling parameters.
Returns
Zero in case of success, other value in case of failure.

◆ bt_df_conn_cte_rsp_disable()

int bt_df_conn_cte_rsp_disable ( struct bt_conn *  conn)

Disable Constant Tone Extension response procedure for a connection.

The function is available if

CONFIG_BT_DF_CONNECTION_CTE_RSP 

is enabled.

Parameters
connConnection object.
Returns
Zero in case of success, other value in case of failure.

◆ bt_df_conn_cte_rsp_enable()

int bt_df_conn_cte_rsp_enable ( struct bt_conn *  conn)

Enable Constant Tone Extension response procedure for a connection.

The function is available if

CONFIG_BT_DF_CONNECTION_CTE_RSP 

is enabled.

Parameters
connConnection object.
Returns
Zero in case of success, other value in case of failure.

◆ bt_df_conn_cte_rx_disable()

int bt_df_conn_cte_rx_disable ( struct bt_conn *  conn)

Disable receive and sampling of Constant Tone Extension for the connection object.

Parameters
connConnection object.
Returns
Zero in case of success, other value in case of failure.

◆ bt_df_conn_cte_rx_enable()

int bt_df_conn_cte_rx_enable ( struct bt_conn *  conn,
const struct bt_df_conn_cte_rx_param params 
)

Enable receive and sampling of Constant Tone Extension for the connection object.

Parameters
connConnection object.
paramsCTE receive and sampling parameters.
Returns
Zero in case of success, other value in case of failure.

◆ bt_df_per_adv_sync_cte_rx_disable()

int bt_df_per_adv_sync_cte_rx_disable ( struct bt_le_per_adv_sync *  sync)

Disable receive and sampling of Constant Tone Extension for the given sync set.

Parameters
syncPeriodic advertising sync object.
Returns
Zero on success or (negative) error code otherwise.

◆ bt_df_per_adv_sync_cte_rx_enable()

int bt_df_per_adv_sync_cte_rx_enable ( struct bt_le_per_adv_sync *  sync,
const struct bt_df_per_adv_sync_cte_rx_param params 
)

Enable receive and sampling of Constant Tone Extension for the given sync set.

Receive and sampling of Constant Tone Extension may be enabled only after periodic advertising sync is established.

Parameters
syncPeriodic advertising sync object.
paramsCTE receive and sampling parameters.
Returns
Zero on success or (negative) error code otherwise.

◆ bt_df_set_adv_cte_tx_param()

int bt_df_set_adv_cte_tx_param ( struct bt_le_ext_adv *  adv,
const struct bt_df_adv_cte_tx_param params 
)

Set or update the Constant Tone Extension parameters for periodic advertising set.

Parameters
[in]advAdvertising set object.
[in]paramsConstant Tone Extension parameters.
Returns
Zero on success or (negative) error code otherwise.

◆ bt_df_set_conn_cte_tx_param()

int bt_df_set_conn_cte_tx_param ( struct bt_conn *  conn,
const struct bt_df_conn_cte_tx_param params 
)

Set Constant Tone Extension transmission parameters for a connection.

The function is available if

CONFIG_BT_DF_CONNECTION_CTE_TX 

is enabled.

Note
If neither BT_DF_CTE_TYPE_AOD_1US or BT_DF_CTE_TYPE_AOD_2US are set in the bitfield, then the bt_df_conn_cte_tx_param.num_ant_ids and bt_df_conn_cte_tx_param.ant_ids parameters will be ignored.
Parameters
connConnection object.
paramsCTE transmission parameters.
Returns
Zero in case of success, other value in case of failure.