Skip to content

Commit ff1d8ef

Browse files
ppryga-nordiccarlescufi
authored andcommitted
Bluetooth: controller: Fix error when max ant. pattern len not defined
Fix compilation error if CONFIG_BT_CTLR_DF is not defined. If DF was not enabled, there was missing CONFIG_BT_CTLR_DF_MAX_- ANT_SW_PATTERN_LEN and undeclared symbol was found. Split ll_df.h into two parts: - ll_df.h that is generally includeable and allows to successfully compile sources when DF is not enabled. - ll_df_internal.h to be used in soucres that are compiled when DF is enabled. Signed-off-by: Piotr Pryga <[email protected]>
1 parent 0b230ae commit ff1d8ef

File tree

3 files changed

+30
-22
lines changed

3 files changed

+30
-22
lines changed

subsys/bluetooth/controller/ll_sw/lll_df.h

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,5 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
/* @brief Configuration of Constant Tone Extension for connectionless
8-
* transmission.
9-
*/
10-
struct lll_df_adv_cfg {
11-
uint8_t is_enabled:1;
12-
uint8_t cte_length:6; /* Length of CTE in 8us units */
13-
uint8_t cte_type:2;
14-
uint8_t cte_count:6;
15-
uint8_t ant_sw_len:6;
16-
uint8_t ant_ids[CONFIG_BT_CTLR_DF_MAX_ANT_SW_PATTERN_LEN];
17-
};
18-
19-
/* @brief Min supported length of antenna switching pattern */
20-
#define LLL_DF_MIN_ANT_PATTERN_LEN 3
21-
22-
/* @brief Max supported CTE length in 8us units */
23-
#define LLL_DF_MAX_CTE_LEN 20
24-
257
int lll_df_init(void);
268
int lll_df_reset(void);
27-
28-
/* Provides number of available antennas for Direction Finding */
29-
uint8_t lll_df_ant_num_get(void);
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright (c) 2020 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/* @brief Configuration of Constant Tone Extension for connectionless
8+
* transmission.
9+
*/
10+
struct lll_df_adv_cfg {
11+
uint8_t is_enabled:1;
12+
uint8_t is_started:1;
13+
uint8_t cte_length:6; /* Length of CTE in 8us units */
14+
uint8_t cte_type:2;
15+
uint8_t cte_count:6;
16+
uint8_t ant_sw_len:6;
17+
uint8_t ant_ids[CONFIG_BT_CTLR_DF_MAX_ANT_SW_PATTERN_LEN];
18+
};
19+
20+
/* @brief Max supported CTE length in 8us units */
21+
#define LLL_DF_MAX_CTE_LEN 20
22+
/* @brief Min supported CTE length in 8us units */
23+
#define LLL_DF_MIN_CTE_LEN 2
24+
25+
/* @brief Min supported length of antenna switching pattern */
26+
#define LLL_DF_MIN_ANT_PATTERN_LEN 3
27+
28+
/* Provides number of available antennae for Direction Finding */
29+
uint8_t lll_df_ant_num_get(void);

subsys/bluetooth/controller/ll_sw/ull_df.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include "ull_adv_internal.h"
2626

2727
#include "ull_df.h"
28-
#include "lll_df.h"
28+
#include "lll_df_internal.h"
2929

3030
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_HCI_DRIVER)
3131
#define LOG_MODULE_NAME bt_ctlr_ull_df

0 commit comments

Comments
 (0)