Bluetooth: controller: Guard ll_adv_iso_by_hci_handle_* functions
Guards the functions with CONFIG_BT_CTLR_HCI_ADV_HANDLE_MAPPING and added a non-HCI inline function for them. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
parent
2c67c29fd4
commit
b527f80f0f
2 changed files with 17 additions and 2 deletions
|
@ -21,6 +21,8 @@ uint8_t ll_addr_set(uint8_t addr_type, uint8_t const *const p_bdaddr);
|
|||
uint8_t ll_adv_set_by_hci_handle_get(uint8_t hci_handle, uint8_t *handle);
|
||||
uint8_t ll_adv_set_by_hci_handle_get_or_new(uint8_t hci_handle,
|
||||
uint8_t *handle);
|
||||
uint8_t ll_adv_iso_by_hci_handle_get(uint8_t hci_handle, uint8_t *handle);
|
||||
uint8_t ll_adv_iso_by_hci_handle_new(uint8_t hci_handle, uint8_t *handle);
|
||||
#else
|
||||
static inline uint8_t ll_adv_set_by_hci_handle_get(uint8_t hci_handle,
|
||||
uint8_t *handle)
|
||||
|
@ -35,10 +37,21 @@ static inline uint8_t ll_adv_set_by_hci_handle_get_or_new(uint8_t hci_handle,
|
|||
*handle = hci_handle;
|
||||
return 0;
|
||||
}
|
||||
static inline uint8_t ll_adv_iso_by_hci_handle_get(uint8_t hci_handle,
|
||||
uint8_t *handle)
|
||||
{
|
||||
*handle = hci_handle;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline uint8_t ll_adv_iso_by_hci_handle_new(uint8_t hci_handle,
|
||||
uint8_t *handle)
|
||||
{
|
||||
*handle = hci_handle;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
uint8_t ll_adv_iso_by_hci_handle_get(uint8_t hci_handle, uint8_t *handle);
|
||||
uint8_t ll_adv_iso_by_hci_handle_new(uint8_t hci_handle, uint8_t *handle);
|
||||
void *ll_iso_tx_mem_acquire(void);
|
||||
void ll_iso_tx_mem_release(void *tx);
|
||||
int ll_iso_tx_mem_enqueue(uint16_t handle, void *tx);
|
||||
|
|
|
@ -230,6 +230,7 @@ int ull_adv_iso_reset(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_HCI_ADV_HANDLE_MAPPING)
|
||||
uint8_t ll_adv_iso_by_hci_handle_get(uint8_t hci_handle, uint8_t *handle)
|
||||
{
|
||||
struct ll_adv_iso *adv_iso;
|
||||
|
@ -275,6 +276,7 @@ uint8_t ll_adv_iso_by_hci_handle_new(uint8_t hci_handle, uint8_t *handle)
|
|||
|
||||
return BT_HCI_ERR_MEM_CAPACITY_EXCEEDED;
|
||||
}
|
||||
#endif /* CONFIG_BT_CTLR_HCI_ADV_HANDLE_MAPPING */
|
||||
|
||||
static uint32_t ull_adv_iso_start(struct ll_adv_iso *adv_iso,
|
||||
uint32_t ticks_anchor)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue