Bluetooth: controller: #if defined(...)
vs #if IS_ENABLED(..)
Use `#if defined(...)` instead of `#if IS_ENABLED(..)` when conditional compilation of definitions in source code. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
c883274711
commit
298b3ca467
14 changed files with 57 additions and 57 deletions
|
@ -2432,8 +2432,8 @@ static void le_read_tx_power(struct net_buf *buf, struct net_buf **evt)
|
|||
ll_tx_pwr_get(&rp->min_tx_power, &rp->max_tx_power);
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF)
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
static void le_df_set_cl_cte_tx_params(struct net_buf *buf,
|
||||
struct net_buf **evt)
|
||||
{
|
||||
|
@ -2481,7 +2481,7 @@ static void le_df_set_cl_cte_enable(struct net_buf *buf, struct net_buf **evt)
|
|||
}
|
||||
#endif /* CONFIG_BT_CTLR_DF_ADV_CTE_TX */
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_CONN_CTE_RSP)
|
||||
#if defined(CONFIG_BT_CTLR_DF_CONN_CTE_RSP)
|
||||
static void le_df_set_conn_cte_tx_params(struct net_buf *buf,
|
||||
struct net_buf **evt)
|
||||
{
|
||||
|
@ -3594,8 +3594,8 @@ static int controller_cmd_handle(uint16_t ocf, struct net_buf *cmd,
|
|||
le_read_tx_power(cmd, evt);
|
||||
break;
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF)
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
case BT_OCF(BT_HCI_OP_LE_SET_CL_CTE_TX_PARAMS):
|
||||
le_df_set_cl_cte_tx_params(cmd, evt);
|
||||
break;
|
||||
|
@ -3606,7 +3606,7 @@ static int controller_cmd_handle(uint16_t ocf, struct net_buf *cmd,
|
|||
case BT_OCF(BT_HCI_OP_LE_READ_ANT_INFO):
|
||||
le_df_read_ant_inf(cmd, evt);
|
||||
break;
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_CONN_CTE_RSP)
|
||||
#if defined(CONFIG_BT_CTLR_DF_CONN_CTE_RSP)
|
||||
case BT_OCF(BT_HCI_OP_LE_SET_CONN_CTE_TX_PARAMS):
|
||||
le_df_set_conn_cte_tx_params(cmd, evt);
|
||||
break;
|
||||
|
|
|
@ -112,14 +112,14 @@
|
|||
#define LL_FEAT_BIT_PER_ADV 0
|
||||
#endif /* !CONFIG_BT_CTLR_ADV_PERIODIC && !CONFIG_BT_CTLR_SYNC_PERIODIC */
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF) && IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF) && defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#define LL_FEAT_BIT_CONNECTIONLESS_CTE_TX \
|
||||
BIT64(BT_LE_FEAT_BIT_CONNECTIONLESS_CTE_TX)
|
||||
#else /* !CONFIG_BT_CTLR_DF && !CONFIG_BT_CTLR_DF_ADV_CTE_TX */
|
||||
#define LL_FEAT_BIT_CONNECTIONLESS_CTE_TX 0
|
||||
#endif /* !CONFIG_BT_CTLR_DF && !CONFIG_BT_CTLR_DF_ADV_CTE_TX */
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF) && IS_ENABLED(CONFIG_BT_CTLR_DF_ANT_SWITCH_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF) && defined(CONFIG_BT_CTLR_DF_ANT_SWITCH_TX)
|
||||
#define LL_FEAT_BIT_ANT_SWITCH_TX_AOD \
|
||||
BIT64(BT_LE_FEAT_BIT_ANT_SWITCH_TX_AOD)
|
||||
#else /* !CONFIG_BT_CTLR_DF && !CONFIG_BT_CTLR_DF_ANT_SWITCH_TX */
|
||||
|
|
|
@ -34,7 +34,7 @@ struct lll_adv_sync {
|
|||
struct lll_adv_iso *iso;
|
||||
#endif /* CONFIG_BT_CTLR_ADV_ISO */
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
/* This flag is used only by LLL. It holds information if CTE
|
||||
* transmission was started by LLL.
|
||||
*/
|
||||
|
|
|
@ -52,8 +52,8 @@ struct df_ant_cfg {
|
|||
#define DFE_GPIO_ALLOWED_ANT_NUM COND_CODE_1(DFE_GPIO_NUM_IS_ZERO, \
|
||||
(BIT(DFE_GPIO_NUM)), (0))
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ANT_SWITCH_TX) || \
|
||||
IS_ENABLED(CONFIG_BT_CTLR_DF_ANT_SWITCH_RX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ANT_SWITCH_TX) || \
|
||||
defined(CONFIG_BT_CTLR_DF_ANT_SWITCH_RX)
|
||||
|
||||
/* Check if there is enough pins configured to represent each pattern
|
||||
* for given antennas number.
|
||||
|
@ -103,8 +103,8 @@ const static struct df_ant_cfg ant_cfg = {
|
|||
*/
|
||||
void radio_df_ant_configure(void)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ANT_SWITCH_TX) || \
|
||||
IS_ENABLED(CONFIG_BT_CTLR_DF_ANT_SWITCH_RX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ANT_SWITCH_TX) || \
|
||||
defined(CONFIG_BT_CTLR_DF_ANT_SWITCH_RX)
|
||||
|
||||
for (uint8_t idx = 0; idx < DF_PSEL_GPIO_NUM; ++idx) {
|
||||
if (ant_cfg.dfe_gpio[idx] != DF_GPIO_PIN_NOT_SET) {
|
||||
|
@ -128,8 +128,8 @@ void radio_df_ant_configure(void)
|
|||
*/
|
||||
uint8_t radio_df_ant_num_get(void)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ANT_SWITCH_TX) || \
|
||||
IS_ENABLED(CONFIG_BT_CTLR_DF_ANT_SWITCH_RX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ANT_SWITCH_TX) || \
|
||||
defined(CONFIG_BT_CTLR_DF_ANT_SWITCH_RX)
|
||||
return ant_cfg.ant_num;
|
||||
#else
|
||||
return 0;
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include "lll_tim_internal.h"
|
||||
#include "lll_adv_internal.h"
|
||||
#include "lll_prof_internal.h"
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#include "lll_df_internal.h"
|
||||
#endif /* CONFIG_BT_CTLR_DF_ADV_CTE_TX */
|
||||
|
||||
|
@ -51,7 +51,7 @@
|
|||
static int init_reset(void);
|
||||
|
||||
static struct pdu_adv *adv_pdu_allocate(struct lll_adv_pdu *pdu, uint8_t last);
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
static inline void adv_extra_data_release(struct lll_adv_pdu *pdu, int idx);
|
||||
static void *adv_extra_data_allocate(struct lll_adv_pdu *pdu, uint8_t last);
|
||||
static int adv_extra_data_free(struct lll_adv_pdu *pdu, uint8_t last);
|
||||
|
@ -121,8 +121,8 @@ static MFIFO_DEFINE(pdu_free, sizeof(void *), PDU_MEM_FIFO_COUNT);
|
|||
/* Semaphore to wakeup thread waiting for free AD data PDU buffers */
|
||||
static struct k_sem sem_pdu_free;
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#define EXTRA_DATA_MEM_SIZE MROUND(sizeof(struct lll_df_adv_cfg))
|
||||
#else
|
||||
#define EXTRA_DATA_MEM_SIZE 0
|
||||
|
@ -220,7 +220,7 @@ int lll_adv_data_reset(struct lll_adv_pdu *pdu)
|
|||
pdu->last = 0U;
|
||||
pdu->pdu[1] = NULL;
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
/* Both slots are NULL because the extra_memory is allocated only
|
||||
* on request. Not every advertising PDU includes extra_data.
|
||||
*/
|
||||
|
@ -317,7 +317,7 @@ struct pdu_adv *lll_adv_pdu_latest_get(struct lll_adv_pdu *pdu,
|
|||
return (void *)pdu->pdu[first];
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
int lll_adv_and_extra_data_init(struct lll_adv_pdu *pdu)
|
||||
{
|
||||
struct pdu_adv *p;
|
||||
|
@ -589,7 +589,7 @@ static int init_reset(void)
|
|||
/* Initialize AC PDU free buffer return queue */
|
||||
MFIFO_INIT(pdu_free);
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
/* Initialize extra data pool */
|
||||
mem_init(mem_extra_data.pool, EXTRA_DATA_MEM_SIZE,
|
||||
(sizeof(mem_extra_data.pool) / EXTRA_DATA_MEM_SIZE), &mem_extra_data.free);
|
||||
|
@ -649,7 +649,7 @@ static struct pdu_adv *adv_pdu_allocate(struct lll_adv_pdu *pdu, uint8_t last)
|
|||
return p;
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
static void *adv_extra_data_allocate(struct lll_adv_pdu *pdu, uint8_t last)
|
||||
{
|
||||
void *extra_data;
|
||||
|
|
|
@ -69,7 +69,7 @@ static inline struct pdu_adv *lll_adv_sync_data_alloc(struct lll_adv_sync *lll,
|
|||
void **extra_data,
|
||||
uint8_t *idx)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
return lll_adv_pdu_and_extra_data_alloc(&lll->data, extra_data, idx);
|
||||
#else
|
||||
return lll_adv_pdu_alloc(&lll->data, idx);
|
||||
|
@ -78,7 +78,7 @@ static inline struct pdu_adv *lll_adv_sync_data_alloc(struct lll_adv_sync *lll,
|
|||
|
||||
static inline void lll_adv_sync_data_release(struct lll_adv_sync *lll)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
lll_adv_and_extra_data_release(&lll->data);
|
||||
#else
|
||||
lll_adv_data_release(&lll->data);
|
||||
|
@ -96,7 +96,7 @@ static inline struct pdu_adv *lll_adv_sync_data_peek(struct lll_adv_sync *lll,
|
|||
{
|
||||
uint8_t last = lll->data.last;
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
if (extra_data) {
|
||||
*extra_data = lll->data.extra_data[last];
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ static inline struct pdu_adv *lll_adv_sync_data_peek(struct lll_adv_sync *lll,
|
|||
struct pdu_adv *lll_adv_pdu_latest_get(struct lll_adv_pdu *pdu,
|
||||
uint8_t *is_modified);
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
struct pdu_adv *lll_adv_pdu_and_extra_data_latest_get(struct lll_adv_pdu *pdu,
|
||||
void **extra_data,
|
||||
uint8_t *is_modified);
|
||||
|
@ -155,7 +155,7 @@ static inline struct pdu_adv *
|
|||
lll_adv_sync_data_latest_get(struct lll_adv_sync *lll, void **extra_data,
|
||||
uint8_t *is_modified)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
return lll_adv_pdu_and_extra_data_latest_get(&lll->data, extra_data,
|
||||
is_modified);
|
||||
#else
|
||||
|
@ -167,7 +167,7 @@ static inline struct pdu_adv *
|
|||
lll_adv_sync_data_curr_get(struct lll_adv_sync *lll, void **extra_data)
|
||||
{
|
||||
uint8_t first = lll->data.first;
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
if (extra_data) {
|
||||
*extra_data = lll->data.extra_data[first];
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ struct lll_adv_pdu {
|
|||
uint8_t volatile first;
|
||||
uint8_t last;
|
||||
uint8_t *pdu[DOUBLE_BUFFER_SIZE];
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
/* This is a storage for LLL configuration that may be
|
||||
* changed while LLL advertising role is started.
|
||||
* Also it makes the configuration data to be in sync
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "lll_internal.h"
|
||||
#include "lll_adv_internal.h"
|
||||
#include "lll_tim_internal.h"
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#include "lll_df_internal.h"
|
||||
#endif /* CONFIG_BT_CTLR_DF_ADV_CTE_TX */
|
||||
|
||||
|
@ -98,7 +98,7 @@ static int init_reset(void)
|
|||
|
||||
static int prepare_cb(struct lll_prepare_param *p)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
struct lll_df_adv_cfg *df_cfg;
|
||||
#endif /* CONFIG_BT_CTLR_DF_ADV_CTE_TX */
|
||||
struct lll_adv_sync *lll;
|
||||
|
@ -158,7 +158,7 @@ static int prepare_cb(struct lll_prepare_param *p)
|
|||
pdu = lll_adv_sync_data_latest_get(lll, &extra_data, &upd);
|
||||
LL_ASSERT(pdu);
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
if (extra_data) {
|
||||
df_cfg = (struct lll_df_adv_cfg *)extra_data;
|
||||
lll_df_conf_cte_tx_enable(df_cfg->cte_type, df_cfg->cte_length,
|
||||
|
@ -176,7 +176,7 @@ static int prepare_cb(struct lll_prepare_param *p)
|
|||
radio_isr_set(lll_isr_done, lll);
|
||||
radio_isr_set(isr_done, lll);
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
if (df_cfg) {
|
||||
radio_switch_complete_and_phy_end_disable();
|
||||
} else
|
||||
|
@ -231,7 +231,7 @@ static void isr_done(void *param)
|
|||
struct lll_adv_sync *lll;
|
||||
|
||||
lll = param;
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
if (lll->cte_started) {
|
||||
lll_df_conf_cte_tx_disable();
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ struct lll_adv_pdu {
|
|||
uint8_t volatile first;
|
||||
uint8_t last;
|
||||
uint8_t *pdu[DOUBLE_BUFFER_SIZE];
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
|
||||
/* This is a storage for LLL configuration that may be
|
||||
* changed while LLL advertising role is started.
|
||||
* Also it makes the configuration data to be in sync
|
||||
|
|
|
@ -457,7 +457,7 @@ int ll_init(struct k_sem *sem_rx)
|
|||
}
|
||||
#endif /* CONFIG_BT_CONN */
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF)
|
||||
#if defined(CONFIG_BT_CTLR_DF)
|
||||
err = ull_df_init();
|
||||
if (err) {
|
||||
return err;
|
||||
|
@ -505,7 +505,7 @@ int ll_init(struct k_sem *sem_rx)
|
|||
}
|
||||
#endif /* CONFIG_BT_CTLR_ADV_ISO */
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF)
|
||||
#if defined(CONFIG_BT_CTLR_DF)
|
||||
err = lll_df_init();
|
||||
if (err) {
|
||||
return err;
|
||||
|
@ -596,7 +596,7 @@ void ll_reset(void)
|
|||
LL_ASSERT(!err);
|
||||
#endif /* CONFIG_BT_CTLR_ADV_ISO */
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF)
|
||||
#if defined(CONFIG_BT_CTLR_DF)
|
||||
err = ull_df_reset();
|
||||
LL_ASSERT(!err);
|
||||
#endif
|
||||
|
@ -1763,7 +1763,7 @@ static void perform_lll_reset(void *param)
|
|||
LL_ASSERT(!err);
|
||||
#endif /* CONFIG_BT_CONN */
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF)
|
||||
#if defined(CONFIG_BT_CTLR_DF)
|
||||
err = lll_df_reset();
|
||||
LL_ASSERT(!err);
|
||||
#endif /* CONFIG_BT_CTLR_DF */
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "lll_adv.h"
|
||||
#include "lll_adv_aux.h"
|
||||
#include "lll_adv_internal.h"
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#include "lll_df_internal.h"
|
||||
#endif /* CONFIG_BT_CTLR_DF_ADV_CTE_TX */
|
||||
|
||||
|
@ -361,7 +361,7 @@ uint8_t ll_adv_aux_set_remove(uint8_t handle)
|
|||
}
|
||||
#endif /* CONFIG_BT_CTLR_ADV_PERIODIC */
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
if (adv->df_cfg) {
|
||||
if (adv->df_cfg->is_enabled) {
|
||||
return BT_HCI_ERR_CMD_DISALLOWED;
|
||||
|
|
|
@ -163,7 +163,7 @@ void ull_adv_sync_offset_get(struct ll_adv_set *adv);
|
|||
int ull_adv_iso_init(void);
|
||||
int ull_adv_iso_reset(void);
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
/* helper function to release unused DF configuration memory */
|
||||
void ull_df_adv_cfg_release(struct lll_df_adv_cfg *df_adv_cfg);
|
||||
#endif /* CONFIG_BT_CTLR_DF_ADV_CTE_TX */
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "lll_adv.h"
|
||||
#include "lll_adv_sync.h"
|
||||
#include "lll_adv_internal.h"
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#include "lll_df_internal.h"
|
||||
#endif /* CONFIG_BT_CTLR_DF_ADV_CTE_TX */
|
||||
|
||||
|
@ -48,7 +48,7 @@ static inline uint16_t sync_handle_get(struct ll_adv_sync_set *sync);
|
|||
static inline uint8_t sync_remove(struct ll_adv_sync_set *sync,
|
||||
struct ll_adv_set *adv, uint8_t enable);
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
static inline void adv_sync_extra_data_set_clear(void *extra_data_prev,
|
||||
void *extra_data_new,
|
||||
uint16_t hdr_add_fields,
|
||||
|
@ -369,7 +369,7 @@ uint32_t ull_adv_sync_start(struct ll_adv_set *adv,
|
|||
struct ll_adv_sync_set *sync,
|
||||
uint32_t ticks_anchor)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
struct lll_df_adv_cfg *df_cfg;
|
||||
#endif /* CONFIG_BT_CTLR_DF_ADV_CTE_TX */
|
||||
uint32_t ticks_slot_overhead;
|
||||
|
@ -385,7 +385,7 @@ uint32_t ull_adv_sync_start(struct ll_adv_set *adv,
|
|||
slot_us = EVENT_OVERHEAD_START_US + EVENT_OVERHEAD_END_US;
|
||||
slot_us += 1000;
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
df_cfg = adv->df_cfg;
|
||||
if (df_cfg && df_cfg->is_enabled) {
|
||||
slot_us += CTE_LEN_US(df_cfg->cte_length);
|
||||
|
@ -443,7 +443,7 @@ void ull_adv_sync_offset_get(struct ll_adv_set *adv)
|
|||
LL_ASSERT(!ret);
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
void ull_adv_sync_update(struct ll_adv_sync_set *sync, uint32_t slot_plus_us,
|
||||
uint32_t slot_minus_us)
|
||||
{
|
||||
|
@ -497,7 +497,7 @@ uint8_t ull_adv_sync_pdu_set_clear(struct ll_adv_set *adv,
|
|||
struct pdu_adv *pdu_prev, *pdu_new;
|
||||
struct lll_adv_sync *lll_sync;
|
||||
void *extra_data_prev;
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
void *extra_data;
|
||||
#endif /* CONFIG_BT_CTLR_DF_ADV_CTE_TX */
|
||||
int err;
|
||||
|
@ -510,7 +510,7 @@ uint8_t ull_adv_sync_pdu_set_clear(struct ll_adv_set *adv,
|
|||
/* Get reference to previous periodic advertising PDU data */
|
||||
pdu_prev = lll_adv_sync_data_peek(lll_sync, &extra_data_prev);
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
/* Get reference to new periodic advertising PDU data buffer */
|
||||
if ((hdr_add_fields & ULL_ADV_PDU_HDR_FIELD_CTE_INFO) ||
|
||||
(!(hdr_rem_fields & ULL_ADV_PDU_HDR_FIELD_CTE_INFO) &&
|
||||
|
@ -541,7 +541,7 @@ uint8_t ull_adv_sync_pdu_set_clear(struct ll_adv_set *adv,
|
|||
return err;
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
if (extra_data) {
|
||||
adv_sync_extra_data_set_clear(extra_data_prev, extra_data,
|
||||
hdr_add_fields, hdr_rem_fields,
|
||||
|
@ -662,7 +662,7 @@ static uint8_t adv_sync_hdr_set_clear(struct lll_adv_sync *lll_sync,
|
|||
uint8_t hdr_buf_len;
|
||||
uint16_t ter_len;
|
||||
uint8_t *ad_data;
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
uint8_t cte_info;
|
||||
#endif /* CONFIG_BT_CTLR_DF_ADV_CTE_TX */
|
||||
uint8_t ad_len;
|
||||
|
@ -690,7 +690,7 @@ static uint8_t adv_sync_hdr_set_clear(struct lll_adv_sync *lll_sync,
|
|||
/* No AdvA in AUX_SYNC_IND */
|
||||
/* No TargetA in AUX_SYNC_IND */
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
/* If requested add or update CTEInfo */
|
||||
if (hdr_add_fields & ULL_ADV_PDU_HDR_FIELD_CTE_INFO) {
|
||||
ter_hdr->cte_info = 1;
|
||||
|
@ -826,7 +826,7 @@ static uint8_t adv_sync_hdr_set_clear(struct lll_adv_sync *lll_sync,
|
|||
|
||||
/* No ADI in AUX_SYNC_IND*/
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
if (ter_hdr->cte_info) {
|
||||
if (hdr_add_fields & ULL_ADV_PDU_HDR_FIELD_CTE_INFO) {
|
||||
*--ter_dptr = cte_info;
|
||||
|
@ -842,7 +842,7 @@ static uint8_t adv_sync_hdr_set_clear(struct lll_adv_sync *lll_sync,
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
/* @brief Set or clear fields in extended advertising header and store
|
||||
* extra_data if requested.
|
||||
*
|
||||
|
|
|
@ -98,7 +98,7 @@ static int init_reset(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
/* @brief Function sets CTE transmission parameters for periodic advertising.
|
||||
*
|
||||
* @param[in]adv_handle Handle of advertising set.
|
||||
|
@ -363,7 +363,7 @@ void ll_df_read_ant_inf(uint8_t *switch_sample_rates,
|
|||
*max_cte_len = LLL_DF_MAX_CTE_LEN;
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
|
||||
/* @brief Function releases unused memory for DF advertising configuration.
|
||||
*
|
||||
* The memory is released to private @ref lll_df_adv_cfg_pool memory store.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue