1 /*
2  * Copyright (c) 2021 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 /* @brief Direction Finding switching sampling rates
8  *
9  * The enum provides information about supported switching
10  * and sampling rates in different Direction Finding types:
11  * - Angle of departure: 1us switching for transmission
12  * - Angle of departure 1us sampling for reception
13  * - Angle of arrival 1us switching-sampling for reception.
14  *
15  * @note Pay attention that both types AoD and AoA
16  * support 2US switching-sampling as mandatory.
17  */
18 enum df_switch_sample_support {
19 	DF_AOD_1US_TX = BIT(0),
20 	DF_AOD_1US_RX = BIT(1),
21 	DF_AOA_1US = BIT(2)
22 };
23 
24 /* TODO Verify required number of IQ reports.
25  * At the moment it is set to 2 (if CONFIG_BT_PER_ADV_SYNC_MAX is set the value
26  * is multiplied by 2):
27  * - for LLL -> ULL
28  * - for ULL -> LL(HCI).
29  */
30 #if defined(CONFIG_BT_PER_ADV_SYNC_MAX) && defined(CONFIG_BT_CTLR_DF_PER_SCAN_CTE_NUM_MAX)
31 #define SYNC_IQ_REPORT_CNT (CONFIG_BT_PER_ADV_SYNC_MAX * CONFIG_BT_CTLR_DF_PER_SCAN_CTE_NUM_MAX * 2)
32 #else
33 #define SYNC_IQ_REPORT_CNT 0U
34 #endif
35 
36 #if defined(CONFIG_BT_MAX_CONN) && defined(CONFIG_BT_CTLR_DF_CONN_CTE_RX)
37 #define CONN_IQ_REPORT_CNT (CONFIG_BT_MAX_CONN * 2)
38 #else
39 #define CONN_IQ_REPORT_CNT 0U
40 #endif
41 
42 #if defined(CONFIG_BT_CTLR_DTM_HCI_DF_IQ_REPORT)
43 #define DTM_IQ_REPORT_CNT CONFIG_BT_CTLR_DTM_HCI_DF_IQ_REPORT_NUM_MAX
44 #else
45 #define DTM_IQ_REPORT_CNT 0U
46 #endif
47 
48 #define IQ_REPORT_CNT (SYNC_IQ_REPORT_CNT + CONN_IQ_REPORT_CNT + DTM_IQ_REPORT_CNT)
49