Commit Graph

8 Commits

Author SHA1 Message Date
Piotr Pryga 8e0444cc17 tests: Bluetooth: df: Add missing intergration_platforms
Add intergration_plaforms entry in testcase.yaml.
Thanks to that nrf52_bsim platform will be used instead
of default platforms that do not include nrf52_bsim.
The test will be not dead as it is now (executed only
when tests code has been changed).

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-03-17 11:34:26 +01:00
Joakim Andersson 9ca13ca664 Bluetooth: host: Refactor command state set handling to one function
Refactor command state state handling to one function.
When setting state outside of hci_core the cmd macro is not available,
so in order to assign the buf pointer to state the function is needed.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-03-15 16:51:51 +02:00
Joakim Andersson 1367220410 tests: Bluetooth: Fix compilation issue in direction finding test
Fix compilation issue in direction finding tests, undefined references
to radio_df_ant_switching_gpios_cfg and
radio_df_ant_switching_pin_sel_cfg

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-03-15 10:19:17 +01:00
Piotr Pryga d06b8053b3 tests: Bluetooth: df: add UT for enable CTE for periodic advertising
Adds unit tests for verification of enable/disable CTE for periodic
advertiging in controller.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-02-15 08:00:58 -05:00
Piotr Pryga e42334982f tests: Bluetooth: df: Move common code to separate source file
Move common code that may be used by different test units
from main.c to common.c. Main.c should be clean and responsible
for unit tests executioon only. Common functionalities should be
stored in separate file and provided to test source files by
appropriate header file.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-02-15 08:00:58 -05:00
Piotr Pryga 515f95382e Bluetooth: controller: radio: Add DF configuration to enable CTE TX
Add set of functions that will make possible to configure
radio Direction Finding Extension to transmit CTE for periodic
advertising.

Some of the new Radio API functions are provided as separate
functions changing the same Radio peripheral registers, e.g.
radio_df_mode_set_aoa, radio_df_mode_set_aod. This is done on
purpose and is related with lack of DFE in nrf52_bsim.
To avoid use of conditionally compiled constants to represent
e.g. CTE mode; separate functions were introduced.
Thanks to that DF unit tests are able to compile successfully
without changes in nrf52_bsim platform. Also if DFE is added
to nrf52_bsim there is no need to change the code until it is
desired.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-02-15 08:00:58 -05:00
Piotr Pryga a8c18ff5f4 tests: Bluetooth: df: Fix build error, missing antenna config in DTS
The DF tests are implemented to be executed with nrf52_bsim platform.
The nrf52_bsim platform does not include Direction Finding Extenstion.
Due to that, radio_df.c compilation failed with error about missing
antenna configuration in DTS.

To solve the problem, I've changed nrf.cmake to include radio_df.c
file when CONFIG_BT_CTLR_DF is defined and CONFIG_SOC_SERIES_BSIM_NRFXX
is not definded.

Thanks to that any other platform is not affected. The file will not
build if there is no appropriate configuration or there are missing
features in a hardwared.

Unit tests have provided stub imlpementation or radio functionality.
If nrf52_bsim has implemented Direction Finding Extension, the
DF unit tests code will stil work and will not require additional
changes. Also content of the file is not affected by contional
compilation entries.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-01-25 21:46:34 -05:00
Piotr Pryga c705970011 tests: bluetooth: Add unit tests for set connectionless CTE parameters
Add unit tests for Direction Finding set of connectionless TX
CTE parameters. Enable DF in nrf52_bsim board.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2020-12-14 11:23:26 +01:00