Pushes all work done in the topic-ble-llcp branch into main branch This is a refactoring of the LL control procedures; the refactored control procedures are hidden behind a KConfig option and per default disabled Goal of the refactoring: close issue Link Layer Control Procedure overhaul #15256 make it easier to add/update control procedures Refactoring consists in principal of writing explicit state machines for the control procedures. To reduce the risk of regression errors unit-tests have been added Following control procedures are implemented: Connection update procedure Channel map update procedure Encryption procedure Feature exchange procedure Version exchange procedure ACL termination procedure Connection parameters request procedure LE Ping procedure Data Length Update procedure PHY update procedure Min. nr. Of channels used procedure Constant Tone extension request procedure This is a joined work by the people listed in the signed-off-by list (in alphabetical order) Signed-off-by: Andries Kruithof Andries.Kruithof@nordicsemi.no Signed-off-by: Erik Brockhoff erbr@oticon.com Signed-off-by: Piotr Pryga piotr.pryga@nordicsemi.no Signed-off-by: Szymon Janc szymon.janc@codecoup.pl Signed-off-by: Thomas Ebert Hansen thoh@oticon.com Signed-off-by: Tommie Skriver tosk@demant.com Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
180 lines
4.0 KiB
CMake
180 lines
4.0 KiB
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
zephyr_library()
|
|
zephyr_library_sources(
|
|
util/mem.c
|
|
util/memq.c
|
|
util/mayfly.c
|
|
util/util.c
|
|
ticker/ticker.c
|
|
ll_sw/ll_addr.c
|
|
ll_sw/ll_tx_pwr.c
|
|
hci/hci_driver.c
|
|
hci/hci.c
|
|
)
|
|
|
|
zephyr_library_sources_ifdef(
|
|
CONFIG_BT_CTLR_CRYPTO
|
|
crypto/crypto.c
|
|
)
|
|
|
|
if(CONFIG_BT_LL_SW_SPLIT)
|
|
if(CONFIG_BT_CTLR_ADVANCED_FEATURES)
|
|
message(WARNING "\nCONFIG_BT_CTLR_ADVANCED_FEATURES=y, Advanced Features' "
|
|
"default value change could change Zephyr Bluetooth "
|
|
"Controller's functional behavior.")
|
|
endif()
|
|
if(CONFIG_BT_CTLR_ADV_EXT)
|
|
message(WARNING "\nCONFIG_BT_CTLR_ADV_EXT=y, Advertising Extensions "
|
|
"Feature in Zephyr Bluetooth Controller is EXPERIMENTAL.")
|
|
endif()
|
|
zephyr_library_sources(
|
|
ll_sw/ll_feat.c
|
|
ll_sw/ull.c
|
|
ll_sw/lll_common.c
|
|
)
|
|
if(CONFIG_BT_BROADCASTER)
|
|
zephyr_library_sources(
|
|
ll_sw/ull_adv.c
|
|
)
|
|
zephyr_library_sources_ifdef(
|
|
CONFIG_BT_CTLR_ADV_EXT
|
|
ll_sw/ull_adv_aux.c
|
|
)
|
|
zephyr_library_sources_ifdef(
|
|
CONFIG_BT_CTLR_ADV_PERIODIC
|
|
ll_sw/ull_adv_sync.c
|
|
)
|
|
zephyr_library_sources_ifdef(
|
|
CONFIG_BT_CTLR_ADV_ISO
|
|
ll_sw/ull_adv_iso.c
|
|
)
|
|
endif()
|
|
if(CONFIG_BT_OBSERVER)
|
|
zephyr_library_sources(
|
|
ll_sw/ull_scan.c
|
|
)
|
|
zephyr_library_sources_ifdef(
|
|
CONFIG_BT_CTLR_ADV_EXT
|
|
ll_sw/ull_scan_aux.c
|
|
)
|
|
zephyr_library_sources_ifdef(
|
|
CONFIG_BT_CTLR_SYNC_PERIODIC
|
|
ll_sw/ull_sync.c
|
|
)
|
|
zephyr_library_sources_ifdef(
|
|
CONFIG_BT_CTLR_SYNC_ISO
|
|
ll_sw/ull_sync_iso.c
|
|
)
|
|
endif()
|
|
if(CONFIG_BT_CONN)
|
|
zephyr_library_sources(
|
|
ll_sw/ull_conn.c
|
|
)
|
|
if(CONFIG_BT_LL_SW_LLCP_LEGACY)
|
|
else()
|
|
zephyr_library_sources_ifdef(
|
|
CONFIG_BT_PHY_UPDATE
|
|
ll_sw/ull_llcp_phy.c
|
|
)
|
|
zephyr_library_sources_ifdef(
|
|
CONFIG_BT_CTLR_LE_ENC
|
|
ll_sw/ull_llcp_enc.c
|
|
)
|
|
zephyr_library_sources(
|
|
ll_sw/ull_tx_queue.c
|
|
ll_sw/ull_llcp.c
|
|
ll_sw/ull_llcp_common.c
|
|
ll_sw/ull_llcp_local.c
|
|
ll_sw/ull_llcp_pdu.c
|
|
ll_sw/ull_llcp_conn_upd.c
|
|
ll_sw/ull_llcp_chmu.c
|
|
ll_sw/ull_llcp_remote.c
|
|
)
|
|
endif()
|
|
if(CONFIG_BT_PERIPHERAL)
|
|
zephyr_library_sources(
|
|
ll_sw/ull_peripheral.c
|
|
)
|
|
zephyr_library_sources_ifdef(
|
|
CONFIG_BT_CTLR_PERIPHERAL_ISO
|
|
ll_sw/ull_peripheral_iso.c
|
|
)
|
|
endif()
|
|
if(CONFIG_BT_CENTRAL)
|
|
zephyr_library_sources(
|
|
ll_sw/ull_central.c
|
|
)
|
|
zephyr_library_sources_ifdef(
|
|
CONFIG_BT_CTLR_CENTRAL_ISO
|
|
ll_sw/ull_central_iso.c
|
|
)
|
|
endif()
|
|
if(CONFIG_BT_CTLR_SCHED_ADVANCED)
|
|
zephyr_library_sources(
|
|
ll_sw/ull_sched.c
|
|
)
|
|
endif()
|
|
endif()
|
|
if(CONFIG_BT_CTLR_DF)
|
|
zephyr_library_sources(
|
|
ll_sw/ull_df.c
|
|
)
|
|
endif()
|
|
if(CONFIG_BT_CTLR_CONN_ISO)
|
|
zephyr_library_sources(
|
|
ll_sw/ull_conn_iso.c
|
|
)
|
|
endif()
|
|
if(CONFIG_BT_CTLR_ISO)
|
|
zephyr_library_sources(
|
|
ll_sw/ull_iso.c
|
|
ll_sw/isoal.c
|
|
)
|
|
endif()
|
|
if(CONFIG_BT_CONN OR
|
|
(CONFIG_BT_BROADCASTER AND
|
|
CONFIG_BT_CTLR_ADV_EXT) OR
|
|
CONFIG_BT_CTLR_ADV_PERIODIC OR
|
|
CONFIG_BT_CTLR_SYNC_PERIODIC)
|
|
zephyr_library_sources(
|
|
ll_sw/ull_chan.c
|
|
ll_sw/lll_chan.c
|
|
)
|
|
endif()
|
|
if(CONFIG_BT_CTLR_FILTER_ACCEPT_LIST OR
|
|
CONFIG_BT_CTLR_SYNC_PERIODIC_ADV_LIST)
|
|
zephyr_library_sources(
|
|
ll_sw/ull_filter.c
|
|
)
|
|
endif()
|
|
zephyr_library_sources_ifdef(
|
|
CONFIG_BT_HCI_MESH_EXT
|
|
ll_sw/ll_mesh.c
|
|
)
|
|
endif()
|
|
|
|
if(CONFIG_SOC_COMPATIBLE_NRF)
|
|
include(ll_sw/nrf.cmake)
|
|
elseif(CONFIG_SOC_OPENISA_RV32M1_RISCV32)
|
|
include(ll_sw/openisa.cmake)
|
|
endif()
|
|
|
|
zephyr_library_sources_ifdef(
|
|
CONFIG_BT_CTLR_SETTINGS
|
|
ll_sw/ll_settings.c
|
|
)
|
|
|
|
zephyr_library_include_directories(
|
|
.
|
|
include
|
|
ll_sw
|
|
)
|
|
|
|
zephyr_library_compile_options_ifdef(
|
|
CONFIG_BT_CTLR_OPTIMIZE_FOR_SPEED
|
|
${OPTIMIZE_FOR_SPEED_FLAG}
|
|
)
|
|
|
|
zephyr_library_link_libraries(subsys__bluetooth)
|