Skip to content

Commit 86c4d90

Browse files
ppryga-nordiccfriedt
authored andcommitted
tests: Bluetooth: df: Add tests for use of CTE in per adv chains
Bluetooth host may request to send more than one CTE in connectionless mode. That is relized by periodic advertising chained PDUs. To check correctness of implementation of such functionality new unit tests were added. Signed-off-by: Piotr Pryga <[email protected]>
1 parent 1207511 commit 86c4d90

File tree

12 files changed

+915
-0
lines changed

12 files changed

+915
-0
lines changed

tests/bluetooth/df/common/src/radio_df_stub.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ void radio_switch_complete_and_phy_end_disable(void)
3838
{
3939
}
4040

41+
void radio_switch_complete_and_phy_end_b2b_tx(uint8_t phy_curr, uint8_t flags_curr,
42+
uint8_t phy_next, uint8_t flags_next)
43+
{
44+
}
45+
4146
void radio_df_cte_tx_aod_2us_set(uint8_t cte_len)
4247
{
4348
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#
2+
# Copyright (c) 2021 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
cmake_minimum_required(VERSION 3.13.1)
7+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
8+
project(bluetooth_df_connectionless_cte_tx)
9+
10+
FILE(GLOB app_sources src/*.c)
11+
SET(common_sources ${CMAKE_CURRENT_SOURCE_DIR}/../common/src/radio_df_stub.c)
12+
13+
target_sources(app PRIVATE ${common_sources} ${app_sources})
14+
15+
# Include paths to allow access to functions implemented in BLE controller
16+
target_include_directories(app PRIVATE
17+
${CMAKE_CURRENT_SOURCE_DIR}/../common/include)
18+
target_include_directories(app PRIVATE
19+
${ZEPHYR_BASE}/subsys/bluetooth/controller)
20+
target_include_directories(app PRIVATE
21+
${ZEPHYR_BASE}/subsys/bluetooth/controller/include)
22+
target_include_directories(app PRIVATE
23+
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw)
24+
target_include_directories(app PRIVATE
25+
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/nordic)
26+
target_include_directories(app PRIVATE
27+
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/nordic/lll)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright (c) 2021 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BT_CTLR_DF_SUPPORT
5+
bool
6+
default y
7+
8+
# Include Zephyr's Kconfig.
9+
source "Kconfig"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
CONFIG_TEST=y
2+
CONFIG_ZTEST=y
3+
4+
CONFIG_BT=y
5+
CONFIG_BT_EXT_ADV=y
6+
CONFIG_BT_PER_ADV=y
7+
8+
CONFIG_BT_CTLR=y
9+
CONFIG_BT_CTLR_ADV_EXT=y
10+
CONFIG_BT_CTLR_ADV_PERIODIC=y
11+
CONFIG_BT_CTLR_DF=y
12+
13+
CONFIG_BT_CTLR_ADVANCED_FEATURES=y
14+
CONFIG_BT_CTLR_ADV_SYNC_PDU_BACK2BACK=y
15+
CONFIG_BT_CTLR_DF_PER_ADV_CTE_NUM_MAX=5

0 commit comments

Comments
 (0)