Skip to content

Commit e7efb85

Browse files
committed
Bluetooth: controller: ULL: Make API for per adv sync PDU change global
Some functions, provided to handle changing content of periodic advertising PDUs, were defined as static. Code responsible for handling direction finding updates periodic advertising PDUs also. For that purposes, those functions were mede globally accessible. Signed-off-by: Piotr Pryga <[email protected]>
1 parent 81f4ed0 commit e7efb85

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

subsys/bluetooth/controller/ll_sw/ull_adv_internal.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ uint8_t ull_adv_aux_hdr_set_clear(struct ll_adv_set *adv,
116116
struct pdu_adv_adi *adi,
117117
uint8_t *pri_idx);
118118

119+
/* helper to initialize extended advertising PDU */
120+
void ull_adv_sync_pdu_init(struct pdu_adv *pdu, uint8_t ext_hdr_flags);
121+
122+
/* helper to add cte_info field to extended advertising header */
123+
uint8_t ull_adv_sync_pdu_cte_info_set(struct pdu_adv *pdu, const struct pdu_cte_info *cte_info);
124+
119125
/* helper function to calculate common ext adv payload header length and
120126
* adjust the data pointer.
121127
* NOTE: This function reverts the header data pointer if there is no

subsys/bluetooth/controller/ll_sw/ull_adv_sync.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static void ticker_op_cb(uint32_t status, void *param);
6565
static struct ll_adv_sync_set ll_adv_sync_pool[CONFIG_BT_CTLR_ADV_SYNC_SET];
6666
static void *adv_sync_free;
6767

68-
static void adv_sync_pdu_init(struct pdu_adv *pdu, uint8_t ext_hdr_flags)
68+
void ull_adv_sync_pdu_init(struct pdu_adv *pdu, uint8_t ext_hdr_flags)
6969
{
7070
struct pdu_adv_com_ext_adv *com_hdr;
7171
struct pdu_adv_ext_hdr *ext_hdr;
@@ -263,8 +263,7 @@ static uint8_t adv_sync_pdu_ad_data_set(struct pdu_adv *pdu,
263263
return 0;
264264
}
265265

266-
static uint8_t adv_sync_pdu_cte_info_set(struct pdu_adv *pdu,
267-
const struct pdu_cte_info *cte_info)
266+
uint8_t ull_adv_sync_pdu_cte_info_set(struct pdu_adv *pdu, const struct pdu_cte_info *cte_info)
268267
{
269268
struct pdu_adv_com_ext_adv *com_hdr;
270269
struct pdu_adv_ext_hdr *ext_hdr;
@@ -370,7 +369,7 @@ uint8_t ll_adv_sync_param_set(uint8_t handle, uint16_t interval, uint16_t flags)
370369
sync->is_started = 0U;
371370

372371
ter_pdu = lll_adv_sync_data_peek(lll_sync, NULL);
373-
adv_sync_pdu_init(ter_pdu, 0);
372+
ull_adv_sync_pdu_init(ter_pdu, 0);
374373
} else {
375374
sync = HDR_LLL2ULL(lll_sync);
376375
}

0 commit comments

Comments
 (0)