Skip to content

Commit 415e068

Browse files
cvinayaknashif
authored andcommitted
Bluetooth: controller: Conditional compile ISO Tx functions
Conditional compile ISO Tx related declarations and implementation. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent a47677d commit 415e068

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

subsys/bluetooth/controller/ll_sw/ull_iso.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ static void *datapath_free;
3737

3838
static int init_reset(void);
3939

40+
#if defined(CONFIG_BT_CTLR_ADV_ISO) || defined(CONFIG_BT_CTLR_CONN_ISO)
4041
static MFIFO_DEFINE(iso_tx, sizeof(struct lll_tx),
4142
CONFIG_BT_CTLR_ISO_TX_BUFFERS);
4243

@@ -45,6 +46,7 @@ static struct {
4546
uint8_t pool[CONFIG_BT_CTLR_ISO_TX_BUFFER_SIZE *
4647
CONFIG_BT_CTLR_ISO_TX_BUFFERS];
4748
} mem_iso_tx;
49+
#endif /* CONFIG_BT_CTLR_ADV_ISO || CONFIG_BT_CTLR_CONN_ISO */
4850

4951
/* must be implemented by vendor */
5052
__weak bool ll_data_path_configured(uint8_t data_path_dir,
@@ -280,8 +282,10 @@ int ull_iso_reset(void)
280282
{
281283
int err;
282284

285+
#if defined(CONFIG_BT_CTLR_ADV_ISO) || defined(CONFIG_BT_CTLR_CONN_ISO)
283286
/* Re-initialize the Tx mfifo */
284287
MFIFO_INIT(iso_tx);
288+
#endif /* CONFIG_BT_CTLR_ADV_ISO || CONFIG_BT_CTLR_CONN_ISO */
285289

286290
err = init_reset();
287291
if (err) {
@@ -291,6 +295,7 @@ int ull_iso_reset(void)
291295
return 0;
292296
}
293297

298+
#if defined(CONFIG_BT_CTLR_ADV_ISO) || defined(CONFIG_BT_CTLR_CONN_ISO)
294299
void *ll_iso_tx_mem_acquire(void)
295300
{
296301
return mem_acquire(&mem_iso_tx.free);
@@ -318,12 +323,15 @@ int ll_iso_tx_mem_enqueue(uint16_t handle, void *tx)
318323

319324
return 0;
320325
}
326+
#endif /* CONFIG_BT_CTLR_ADV_ISO || CONFIG_BT_CTLR_CONN_ISO */
321327

322328
static int init_reset(void)
323329
{
330+
#if defined(CONFIG_BT_CTLR_ADV_ISO) || defined(CONFIG_BT_CTLR_CONN_ISO)
324331
/* Initialize tx pool. */
325332
mem_init(mem_iso_tx.pool, CONFIG_BT_CTLR_ISO_TX_BUFFER_SIZE,
326333
CONFIG_BT_CTLR_ISO_TX_BUFFERS, &mem_iso_tx.free);
334+
#endif /* CONFIG_BT_CTLR_ADV_ISO || CONFIG_BT_CTLR_CONN_ISO */
327335

328336
#if defined(CONFIG_BT_CTLR_CONN_ISO_STREAMS)
329337
/* Initialize ISO Datapath pool */

0 commit comments

Comments
 (0)