Skip to content
Permalink
Browse files

Bluetooth: controller: split: Add interface to get adv/scan handle

Added interface to get Advertiser and Scanner instance
handle for use in Lower Link Layer module.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
  • Loading branch information...
cvinayak authored and aescolar committed Jul 3, 2019
1 parent 91d057f commit 3aa57808acd5c184b853b1850c6b748ec0c3d905
@@ -101,3 +101,5 @@ static inline struct pdu_adv *lll_adv_scan_rsp_peek(struct lll_adv *lll)
{
return (void *)lll->scan_rsp.pdu[lll->scan_rsp.last];
}

extern u16_t ull_adv_lll_handle_get(struct lll_adv *lll);
@@ -43,3 +43,5 @@ int lll_scan_init(void);
int lll_scan_reset(void);

void lll_scan_prepare(void *param);

extern u16_t ull_scan_lll_handle_get(struct lll_scan *lll);
@@ -925,6 +925,11 @@ inline u16_t ull_adv_handle_get(struct ll_adv_set *adv)
return ((u8_t *)adv - (u8_t *)ll_adv) / sizeof(*adv);
}

u16_t ull_adv_lll_handle_get(struct lll_adv *lll)
{
return ull_adv_handle_get((void *)lll->hdr.parent);
}

inline struct ll_adv_set *ull_adv_is_enabled_get(u16_t handle)
{
struct ll_adv_set *adv;
@@ -296,6 +296,11 @@ u16_t ull_scan_handle_get(struct ll_scan_set *scan)
return ((u8_t *)scan - (u8_t *)ll_scan) / sizeof(*scan);
}

u16_t ull_scan_lll_handle_get(struct lll_scan *lll)
{
return ull_scan_handle_get((void *)lll->hdr.parent);
}

struct ll_scan_set *ull_scan_is_enabled_get(u16_t handle)
{
struct ll_scan_set *scan;

0 comments on commit 3aa5780

Please sign in to comment.
You can’t perform that action at this time.