Bluetooth: controller: Add init/reset stubs for CIS central/peripheral ULL
Add stub functions to initialize and reset CIS central and CIS peripheral roles in ULL. Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
This commit is contained in:
parent
4c9f89352b
commit
b452321c51
8 changed files with 148 additions and 2 deletions
|
@ -90,6 +90,12 @@ if(CONFIG_BT_LL_SW_SPLIT)
|
|||
)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BT_CTLR_PERIPHERAL_ISO OR
|
||||
CONFIG_BT_CTLR_CENTRAL_ISO)
|
||||
zephyr_library_sources(
|
||||
ll_sw/ull_conn_iso.c
|
||||
)
|
||||
endif()
|
||||
if(CONFIG_BT_CTLR_ADV_ISO OR
|
||||
CONFIG_BT_CTLR_SYNC_ISO OR
|
||||
CONFIG_BT_CTLR_PERIPHERAL_ISO OR
|
||||
|
|
|
@ -52,6 +52,9 @@
|
|||
#include "ull_sync_internal.h"
|
||||
#include "ull_sync_iso_internal.h"
|
||||
#include "ull_conn_internal.h"
|
||||
#include "ull_conn_iso_internal.h"
|
||||
#include "ull_central_iso_internal.h"
|
||||
#include "ull_peripheral_iso_internal.h"
|
||||
#include "ull_df.h"
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_USER_EXT)
|
||||
|
@ -459,12 +462,34 @@ int ll_init(struct k_sem *sem_rx)
|
|||
* CONFIG_BT_CTLR_PERIPHERAL_ISO || CONFIG_BT_CTLR_CENTRAL_ISO
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_PERIPHERAL_ISO) || \
|
||||
defined(CONFIG_BT_CTLR_CENTRAL_ISO)
|
||||
err = ull_conn_iso_init();
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
#endif /* CONFIG_BT_CTLR_PERIPHERAL_ISO || CONFIG_BT_CTLR_CENTRAL_ISO */
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_PERIPHERAL_ISO)
|
||||
err = ull_peripheral_iso_init();
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
#endif /* CONFIG_BT_CTLR_PERIPHERAL_ISO */
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_CENTRAL_ISO)
|
||||
err = ull_central_iso_init();
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
#endif /* CONFIG_BT_CTLR_CENTRAL_ISO */
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_ADV_ISO)
|
||||
err = ull_adv_iso_init();
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
#endif /* CONFIG_BT_CONN */
|
||||
#endif /* CONFIG_BT_CTLR_ADV_ISO */
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF)
|
||||
err = lll_df_init();
|
||||
|
@ -535,11 +560,27 @@ void ll_reset(void)
|
|||
* CONFIG_BT_CTLR_PERIPHERAL_ISO || CONFIG_BT_CTLR_CENTRAL_ISO
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_PERIPHERAL_ISO) || \
|
||||
defined(CONFIG_BT_CTLR_CENTRAL_ISO)
|
||||
err = ull_conn_iso_reset();
|
||||
LL_ASSERT(!err);
|
||||
#endif /* CONFIG_BT_CTLR_PERIPHERAL_ISO || CONFIG_BT_CTLR_CENTRAL_ISO */
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_PERIPHERAL_ISO)
|
||||
err = ull_peripheral_iso_reset();
|
||||
LL_ASSERT(!err);
|
||||
#endif /* CONFIG_BT_CTLR_PERIPHERAL_ISO */
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_CENTRAL_ISO)
|
||||
err = ull_central_iso_reset();
|
||||
LL_ASSERT(!err);
|
||||
#endif /* CONFIG_BT_CTLR_CENTRAL_ISO */
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_ADV_ISO)
|
||||
/* Reset periodic sync sets */
|
||||
err = ull_adv_iso_reset();
|
||||
LL_ASSERT(!err);
|
||||
#endif /* CONFIG_BT_CTLR_SYNC_PERIODIC */
|
||||
#endif /* CONFIG_BT_CTLR_ADV_ISO */
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_CTLR_DF)
|
||||
err = ull_df_reset();
|
||||
|
|
|
@ -122,3 +122,13 @@ void ll_cis_create(uint16_t cis_handle, uint16_t acl_handle)
|
|||
ARG_UNUSED(cis_handle);
|
||||
ARG_UNUSED(acl_handle);
|
||||
}
|
||||
|
||||
int ull_central_iso_init(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ull_central_iso_reset(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright (c) 2021 Demant
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/* Helper functions to initialize and reset ull_central_iso module */
|
||||
int ull_central_iso_init(void);
|
||||
int ull_central_iso_reset(void);
|
52
subsys/bluetooth/controller/ll_sw/ull_conn_iso.c
Normal file
52
subsys/bluetooth/controller/ll_sw/ull_conn_iso.c
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright (c) 2021 Demant
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr.h>
|
||||
|
||||
#include "util/mem.h"
|
||||
#include "util/memq.h"
|
||||
|
||||
#include "lll.h"
|
||||
#include "lll_conn_iso.h"
|
||||
#include "ull_conn_iso_types.h"
|
||||
|
||||
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_HCI_DRIVER)
|
||||
#define LOG_MODULE_NAME bt_ctlr_ull_conn_iso
|
||||
#include "common/log.h"
|
||||
#include "hal/debug.h"
|
||||
|
||||
static struct ll_conn_iso_stream cis_pool[CONFIG_BT_CTLR_CONN_ISO_STREAMS];
|
||||
static void *cis_free;
|
||||
|
||||
static struct ll_conn_iso_group cig_pool[CONFIG_BT_CTLR_CONN_ISO_GROUPS];
|
||||
static void *cig_free;
|
||||
|
||||
static int init_reset(void);
|
||||
|
||||
int ull_conn_iso_init(void)
|
||||
{
|
||||
return init_reset();
|
||||
}
|
||||
|
||||
int ull_conn_iso_reset(void)
|
||||
{
|
||||
return init_reset();
|
||||
}
|
||||
|
||||
static int init_reset(void)
|
||||
{
|
||||
/* Initialize CIS pool */
|
||||
mem_init(cis_pool, sizeof(struct ll_conn_iso_stream),
|
||||
sizeof(cis_pool) / sizeof(struct ll_conn_iso_stream),
|
||||
&cis_free);
|
||||
|
||||
/* Initialize CIG pool */
|
||||
mem_init(cig_pool, sizeof(struct ll_conn_iso_group),
|
||||
sizeof(cig_pool) / sizeof(struct ll_conn_iso_group),
|
||||
&cig_free);
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright (c) 2021 Demant
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/* Helper functions to initialize and reset ull_conn_iso module */
|
||||
int ull_conn_iso_init(void);
|
||||
int ull_conn_iso_reset(void);
|
|
@ -25,3 +25,13 @@ uint8_t ll_cis_reject(uint16_t handle, uint8_t reason)
|
|||
|
||||
return BT_HCI_ERR_CMD_DISALLOWED;
|
||||
}
|
||||
|
||||
int ull_peripheral_iso_init(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ull_peripheral_iso_reset(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright (c) 2021 Demant
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/* Helper functions to initialize and reset ull_peripheral_iso module */
|
||||
int ull_peripheral_iso_init(void);
|
||||
int ull_peripheral_iso_reset(void);
|
Loading…
Add table
Add a link
Reference in a new issue