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 <piotr.pryga@nordicsemi.no>
This commit is contained in:
parent
0b230ae639
commit
ff1d8efd38
3 changed files with 30 additions and 22 deletions
|
@ -4,26 +4,5 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/* @brief Configuration of Constant Tone Extension for connectionless
|
||||
* transmission.
|
||||
*/
|
||||
struct lll_df_adv_cfg {
|
||||
uint8_t is_enabled:1;
|
||||
uint8_t cte_length:6; /* Length of CTE in 8us units */
|
||||
uint8_t cte_type:2;
|
||||
uint8_t cte_count:6;
|
||||
uint8_t ant_sw_len:6;
|
||||
uint8_t ant_ids[CONFIG_BT_CTLR_DF_MAX_ANT_SW_PATTERN_LEN];
|
||||
};
|
||||
|
||||
/* @brief Min supported length of antenna switching pattern */
|
||||
#define LLL_DF_MIN_ANT_PATTERN_LEN 3
|
||||
|
||||
/* @brief Max supported CTE length in 8us units */
|
||||
#define LLL_DF_MAX_CTE_LEN 20
|
||||
|
||||
int lll_df_init(void);
|
||||
int lll_df_reset(void);
|
||||
|
||||
/* Provides number of available antennas for Direction Finding */
|
||||
uint8_t lll_df_ant_num_get(void);
|
||||
|
|
29
subsys/bluetooth/controller/ll_sw/lll_df_internal.h
Normal file
29
subsys/bluetooth/controller/ll_sw/lll_df_internal.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Nordic Semiconductor ASA
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/* @brief Configuration of Constant Tone Extension for connectionless
|
||||
* transmission.
|
||||
*/
|
||||
struct lll_df_adv_cfg {
|
||||
uint8_t is_enabled:1;
|
||||
uint8_t is_started:1;
|
||||
uint8_t cte_length:6; /* Length of CTE in 8us units */
|
||||
uint8_t cte_type:2;
|
||||
uint8_t cte_count:6;
|
||||
uint8_t ant_sw_len:6;
|
||||
uint8_t ant_ids[CONFIG_BT_CTLR_DF_MAX_ANT_SW_PATTERN_LEN];
|
||||
};
|
||||
|
||||
/* @brief Max supported CTE length in 8us units */
|
||||
#define LLL_DF_MAX_CTE_LEN 20
|
||||
/* @brief Min supported CTE length in 8us units */
|
||||
#define LLL_DF_MIN_CTE_LEN 2
|
||||
|
||||
/* @brief Min supported length of antenna switching pattern */
|
||||
#define LLL_DF_MIN_ANT_PATTERN_LEN 3
|
||||
|
||||
/* Provides number of available antennae for Direction Finding */
|
||||
uint8_t lll_df_ant_num_get(void);
|
|
@ -25,7 +25,7 @@
|
|||
#include "ull_adv_internal.h"
|
||||
|
||||
#include "ull_df.h"
|
||||
#include "lll_df.h"
|
||||
#include "lll_df_internal.h"
|
||||
|
||||
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_HCI_DRIVER)
|
||||
#define LOG_MODULE_NAME bt_ctlr_ull_df
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue