Add broadcast support to the CAP initiator sample.
This adds new sample-specific Kconfig options to help
select the right Kconfig options based on whether
unicast, broadcast or both is being used.
This also moves common TX functionality
to cap_initiator_tx to reuse the same TX thread
and functionality.
Finally there is a babblesim implemented for
the broadcast. There is not broadcast support for the
CAP acceptor sample yet, so this test only verifies that we
get the TX complete events from the controller.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a void *user_data pointer to the input callback structure. This is
useful for driver to get back the driver data structure and avoid
defining wrapper functions.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Appropriately setting the `--target` flag is necessary when using clang
and building for a target other than the default. Zephyr generally
accomplishes this by setting the CMAKE_<LANG>_COMPILER_TARGET variables and
allowing cmake to automatically provide the `--target` flag when building.
For the external_lib sample, however, cmake can't add the flag and it was
not otherwise exported. As such, clang typically threw errors when building
this sample for any non-default targets due to mismatches between
target-specific flags and the default target.
To fix this, ensure we select the correct target by checking if
CMAKE_C_COMPILER_TARGET has been defined and adding
`--target=<triple>` to the list of flags that are exported if so.
Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
This commit adds a brief thread b suspend while the sample sets its
affinity mask.
If the call to `k_thread_cpu_pin` is being made while the thread is
actively running, then we get `-EINVAL` and the affinity mask is left
unchanged.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
The button sample is really a gpio interrupt sample, one may easily miss
the debounced driver and think it's not provided.
Add a note in the basic button sample documentation to refer to the
input subsystem doc and sample.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
twister expects regex print from logging used in the sample. Sample
is using minimal logging which does not protect against logs being
interleaved if printed from various contexts. Minimal logging is
just mapping of logging API to printk. Add CONFIG_PRINTK_SYNC to
ensure that printing of each log is synchronous (with lock) and
logs are never interleaved.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Now that flash controller driver is supported on M4 of stm32h745i_disco,
remove it from platform_exclude list and add an overlay for flash_shell
sample.
Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
Now that flash controller driver is supported on M4 of stm32h747i_disco,
remove it from platform_exclude list and add an overlay for flash_shell
sample
Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
Introduce UDC_BUF_POOL_*_DEFINE macros based on NET_BUF_POOL_*_DEFINE
macros but use our own version of alloc and unref callbacks to get
buffers with specific alignment and granularity. Also, do not use ref
callback because it breaks alignment.
Also introduces helper macros for defining and checking UDC
driver-compliant static buffers.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The accel_polling sample uses various sensor, but doesn't set a sampling
rate. But some sensors (like st,lsm6dso) have a default sampling
frequency of 0. So, depending on the sensor, the sample may not always
work.
There are two ways to fix this: either all drivers must set a valid
sampling rate, or the sample shall at least try to set a value if there
is none.
We propose here the second approach, wich should allow the sample to
work on more sensors out of the box.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
Added i2c configuration to test target_eeprom case for frdm_ke17z
Added `sample.drivers.i2c.target.kinetis` in sample.yaml for frdm_ke17z
and frdm_ke17z512 automatically run the tests
Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
Updates the output sample to more closely resemble the output for a
recent Zephyr version (current was v1.14). Fixes#76275.
Updates broken tf-m documentation link to their new URL.
Signed-off-by: Adrien Leravat <adrien.leravat@gmail.com>
If config library is disabled but DHCPv4 client is enabled,
then start DHCPv4 when zperf application starts.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Refactors teh BIS bitfield values used for ISO
and BAP.
Previously BIT(1) meant BIS index 1, which was a Zephyr choice
in the early days of ISO, as the BT Core spec did not use
a bitfield for BIS indexes.
Later the BASS specification came along and defined that
BIT(0) meant BIS index 1, which meant that we had to shift BIS
bitfields between BAP and ISO.
This commit refactors the ISO layer to use BIT(0) for Index 1 now,
which means that there is no longer a need for conversion
between the BAP and ISO layers, and that we can use a value
range defined by a BT Core spec (BASS).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Was broken after BT_LE_ADV_OPT_USE_NAME and
BT_LE_ADV_OPT_FORCE_NAME_IN_AD were deprecated.
The periodic_adv_rsp sample
looks for the string "PAwR sync sample" and connects based on that.
So, the periodic_sync_rsp sample needs to advertise this string.
Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
If the remote side has already terminated the connection (or the
connection failed to establish), don't attempt to terminate an invalid
connection object. Instead, start advertising again immediately.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Change USBD_CONFIGURATION_DEFINE macro to take the address of a string
descriptor node as an argument. This is a breaking change for macro
users, but quite convenient and easy to implement.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Extended the x-nucleo-iks4a1 shield standard sample adding lsm6dsv16x
sensor die temperature display.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Docs now start at a high level, discussing sensors, attributes,
channels, and reading data from them.
Followed by more detailed usage guides in how to solve common problems
sensor users may run into.
Additionally renames the sensor_api sphinx tag to sensor
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Add a sample that can test various TF-M build options. For now we only
test `CONFIG_TFM_BL2=n` and `CONFIG_TFM_MCUBOOT_IMAGE_NUMBER=1`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
It looks like sample called nrf53_cpunet_enable(false) before any
nrf53_cpunet_enable(true), resulting in asserts due to unbalanced calls
(error propagated from onoff service).
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
The sample will print a ping-pong message indefinitely on both,
application (or main) core and remote core. When twister is run in
device testing mode, only one terminal is evaluated (application), so
the regex just needs to account for the application core output, not
remote.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
In case of minimal libc we have CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE = 0
by default. Let's set CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE explicitly
so we can allocate memory for environment variables.
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Remove references to new device APIs that are not supported by the
samples. Remove the reference to the UART API from the console sample
because it is not really used there, but add it to the CDC ACM sample.
Fix references in HID, MSC and UAC2 samples.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
A hard fault occurs when the `sample_echo_packet` function attempts
to print the average time per successful echo and no packets have
been sent, resulting in a division by zero error. This fix adds a check
to ensure that `packets_sent` is greater than 0 before performing
the division. This prevents the system from halting due to a usage fault.
Signed-off-by: Natalia Pluta <pluta.natalia.m@gmail.com>
As found in PR #75525, we should not modify the polled fd array
in multiple places. Because of this fix, the async version of
the socket service could start to trigger while it is being handled
by the async handler. This basically means that the async version
cannot work as intended so remove its support.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Those platfroms use rtt as debug port that conflicts with usermode, as
in 27d519b260.
Fixes#75617
Signed-off-by: Guy Morand <guy.morand@bytesatwork.ch>
Use the message queue to pass the new report from the input callback,
and use a semaphore to protect the report buffer until it is transferred
to the host.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Fix build error due to cmake requiring a separate
overlay for each of this target's SOCs.
Error being fixed:
```
-- Board: sam_v71_xult, qualifiers: samv71q21
CMake Error at cmake/modules/extensions.cmake:2742 (message):
Board sam_v71_xult defines multiple SoCs.
Shortened file name (sam_v71_xult.overlay) not allowed, use
'<board>_<soc>.overlay' naming
```
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Replace platform_allow with integration_platforms, what allow CI to
build samples on all platforms with test feature 'usbd' but still limits
number of platforms when it is invoked with the --integration option.
Replace/add some platforms that already have test feature 'usbd'.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The broadcast sink sample no longer treats the broadcast_code_received
semaphore as a boolean.
Fixes#75469
Signed-off-by: Jens Rehhoff Thomsen <jthm@demant.com>
exclude cyw920829m2evk_02 from build. For cyw920829m2evk_02
need `west bloobs fetch` (to get BT fw), which does not
allowed in CI.
Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
Increase the number of network packets and buffers for better TCP
performance in the sample out-of-the-box.
Decrease the network buffer data size for better buffer management in
the sample (less buffer space wasted for L2 header). The only drawback
of this is reduced TCP TX performance, but less than 2 Mbps in my case.
Finally, enable speed optimizations for another small performance boost.
As the RAM requirements of the sample now increase considerably in the
default configuration, add a note in the readme file about it, and how
to make it fit into smaller boards.
Tested on nucleo_h723zg:
Before (current defaults):
UDP TX RX
76.47 Mbps 93.48 Mbps
TCP TX RX
76.18 Mbps 67.75 Mbps
After (new defaults):
UDP TX RX
76.08 Mbps 93.62 Mbps
TCP TX RX
74.19 Mbps 85.51 Mbps
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>