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>
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>
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>
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>
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>
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>
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>