Bluetooth: controller: split: Fix cond. complile of periodic adv
Fix conditional compilation of advertising extensions and periodic advertising do that platforms with not support in their LLL can be built without advertising extensions. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
de3d4a3a64
commit
b348b7fa28
3 changed files with 36 additions and 28 deletions
|
@ -1080,7 +1080,7 @@ int ull_adv_init(void)
|
|||
{
|
||||
int err;
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_CTLR_ADV_EXT)) {
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT)
|
||||
#if defined(CONFIG_BT_CTLR_ADV_AUX_SET)
|
||||
if (CONFIG_BT_CTLR_ADV_AUX_SET > 0) {
|
||||
err = ull_adv_aux_init();
|
||||
|
@ -1088,15 +1088,15 @@ int ull_adv_init(void)
|
|||
return err;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_CTLR_ADV_PERIODIC)) {
|
||||
#if defined(CONFIG_BT_CTLR_ADV_PERIODIC)
|
||||
err = ull_adv_sync_init();
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_BT_CTLR_ADV_PERIODIC */
|
||||
#endif /* CONFIG_BT_CTLR_ADV_AUX_SET */
|
||||
#endif /* CONFIG_BT_CTLR_ADV_EXT */
|
||||
|
||||
err = init_reset();
|
||||
if (err) {
|
||||
|
@ -1111,7 +1111,7 @@ int ull_adv_reset(void)
|
|||
uint8_t handle;
|
||||
int err;
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_CTLR_ADV_EXT)) {
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT)
|
||||
#if defined(CONFIG_BT_CTLR_ADV_AUX_SET)
|
||||
if (CONFIG_BT_CTLR_ADV_AUX_SET > 0) {
|
||||
err = ull_adv_aux_reset();
|
||||
|
@ -1119,15 +1119,15 @@ int ull_adv_reset(void)
|
|||
return err;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_CTLR_ADV_PERIODIC)) {
|
||||
#if defined(CONFIG_BT_CTLR_ADV_PERIODIC)
|
||||
err = ull_adv_sync_reset();
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_BT_CTLR_ADV_PERIODIC */
|
||||
#endif /* CONFIG_BT_CTLR_ADV_AUX_SET */
|
||||
#endif /* CONFIG_BT_CTLR_ADV_EXT */
|
||||
|
||||
for (handle = 0U; handle < BT_CTLR_ADV_MAX; handle++) {
|
||||
(void)disable(handle);
|
||||
|
|
|
@ -27,6 +27,7 @@ uint32_t ull_adv_filter_pol_get(uint8_t handle);
|
|||
/* Return ll_adv_set context if created */
|
||||
struct ll_adv_set *ull_adv_is_created_get(uint8_t handle);
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT)
|
||||
int ull_adv_aux_init(void);
|
||||
int ull_adv_aux_reset(void);
|
||||
|
||||
|
@ -40,6 +41,7 @@ uint8_t ull_adv_aux_stop(struct ll_adv_aux_set *aux);
|
|||
/* helper function to schedule a mayfly to get aux offset */
|
||||
void ull_adv_aux_offset_get(struct ll_adv_set *adv);
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_ADV_PERIODIC)
|
||||
int ull_adv_sync_init(void);
|
||||
int ull_adv_sync_reset(void);
|
||||
|
||||
|
@ -49,3 +51,5 @@ uint32_t ull_adv_sync_start(struct ll_adv_sync_set *sync, uint32_t ticks_anchor,
|
|||
|
||||
/* helper function to schedule a mayfly to get sync offset */
|
||||
void ull_adv_sync_offset_get(struct ll_adv_set *adv);
|
||||
#endif /* CONFIG_BT_CTLR_ADV_PERIODIC */
|
||||
#endif /* CONFIG_BT_CTLR_ADV_EXT */
|
||||
|
|
|
@ -31,6 +31,7 @@ struct ll_adv_set {
|
|||
#endif /* CONFIG_BT_CTLR_PRIVACY */
|
||||
};
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT)
|
||||
struct ll_adv_aux_set {
|
||||
struct evt_hdr evt;
|
||||
struct ull_hdr ull;
|
||||
|
@ -41,6 +42,7 @@ struct ll_adv_aux_set {
|
|||
uint8_t is_started:1;
|
||||
};
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_ADV_PERIODIC)
|
||||
struct ll_adv_sync_set {
|
||||
struct evt_hdr evt;
|
||||
struct ull_hdr ull;
|
||||
|
@ -51,3 +53,5 @@ struct ll_adv_sync_set {
|
|||
uint8_t is_enabled:1;
|
||||
uint8_t is_started:1;
|
||||
};
|
||||
#endif /* CONFIG_BT_CTLR_ADV_PERIODIC */
|
||||
#endif /* CONFIG_BT_CTLR_ADV_EXT */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue