Fix implementation of Broadcast ISO Synchronized Receiver
using single switch timer to consider minimum compare value
requirement.
This fix reduces latencies to setup radio receptions and
fixes an assertion in lll_sync_iso when radio_tmr_start_us()
is checked for latencies.
Relates to commit 5dfc58cff9 ("Bluetooth: Controller: Fix
single switch timer minimum compare value").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Moved the nrf_etr driver from the drive/misc folder into the recently
established driver/debug folder where it is a better fit. Moved the
associated files such as bindings and headers accordingly as well.
Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
ll_length_req_send and ll_length_default_set were defined to return
a uint32_t, but only returned a uint8_t HCI error code and
was the return value was always stored as such.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a new sample to demonstrate usage of the newly introduced
Network MIDI 2.0 host stack.
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Add a new network protocol for MIDI2.0 over the network, using UDP sockets.
This allows Zephyr to host a UMP endpoint on the network, which can be
invited by UMP clients to exchange MIDI2.0 data.
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Since a new device-tree property has been introduced to describe if a
UMP group is limited to 31.25kb/s (like a physical MIDI DIN-5 port),
this can be used in the USB UMP group terminal block descriptors, as
specified in the USB-MIDI2.0 reference document [1], (in 5.4.2.1
Group Terminal Block Descriptor):
Maximum Output Bandwidth Capability in 4KB/second. 0x0000 – 0xFFFF.
Bandwidth is total for this Block, shared among all OUT Group Terminals.
0x0000 = Unknown or Not Fixed.
0x0001 = Rounded version of 31.25kb/s
[1] https://www.usb.org/sites/default/files/USB%20MIDI%20v2_0.pdf
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Adds cast to int when ret is assigned error code returned by
functions that return int64_t. The cast has been added to indicate
that assignment with truncation is here intentional.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
0-init some non-static global variables to avoid
issues with uninitialized values. Also modify
the printing of the broadcast sources found slightly.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Uses the full hwmv2 board target for the hardware platform output,
seemingly this was missed in the hwmv2 migration and it was using
the board name only. Adds a deprecated Kconfig to restore to the
previous behaviour
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Pass a pointer to the CoAP packet in the response data. This allows
callback function to inspect for CoAP options.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Make it easier to modify the response callback data by passing it as a
struct pointer rather than a long list of arguments.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
When `CONFIG_NRF_SYS_EVENT` is enabled, route constant latency requests
through the reference counted API.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The code was writing to the dst without a verification check on
size which is not appropriate. The guard on the arguements should
be enforced and so just ensure the size is larger then the
definition of the strings from POSIX and return an error in those
cases.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
From the manpage for inet_ntop
This function converts the network address structure src in the af
address family into a character string. The resulting string is
copied to the buffer pointed to by dst, which must be a non-null
pointer. The caller specifies the number of bytes available in
this buffer in the argument size.
In an unintended misconfiguration the resolve max string ended up
being 20 and tracking thru some wierd code issues determined some
stack corruption which came back to the shell command. So, just
fix the size argument to be the sizeof which then leads to the next
problem that the size is being ignored by inet_ntop.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
This commit adds the NVMEM subsystem with a basic implementation for use
with EEPROM devices.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
zsock_recvfrom() takes as last argument a socklen_t pointer
( c546c1cad1 )
whose definition has changed.
So let's ensure we pass the right type of pointer to it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Zephyr's socklen_t was changed in
c546c1cad1
to be uint32_t instea of size_t.
Let's fix accordingly the prototypes which expect it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
zsock_recvfrom() takes as last argument a socklen_t pointer
which type was changed in
c546c1cad1
as is not anymore equivalent to size_t.
So let's ensure we pass the right type of pointer to it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
There is an issue when zephyr is compiled with native_sim_64 where
size_t is 8 bytes. The socklen_t in specified as 4 bytes in Linux
even for 64 bit builds so we have a conflict between Linux and Zephyr.
To make things work properly, define socklen_t as uint32_t in order to
align with Linux. Four bytes is enough for socket address length anyway.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Automatically size the CMUX work buffers based on
`CONFIG_MODEM_CMUX_MTU`. This eliminates a Kconfig variable that would
otherwise need to manually be kept in sync. The option to extend the
size of these buffers is still provided through
`CONFIG_MODEM_CMUX_WORK_BUFFER_SIZE_EXTRA`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
When connecting to WiFi from stored credentials, the key_passwd is never
freed.
Additionally if the connect fails, the allocated data was never freed.
Convert heap allocated memory to stack allocated buffers.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit adds the instrumentation subsystem.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
Add an option that excludes generation of a given path of `.gcda` files
when running coverage testing. This can be useful when running testing
coverage on downstream repos, which would otherwise result in large
`.gcda` files for paths we don't care about filling up the disk.
One example of using this is to exclude coverage outputs from
mbedtls files with the following:
`CONFIG_COVERAGE_DUMP_PATH_EXCLUDE="*modules/crypto/mbedtls*"`
Signed-off-by: Jordan Yates <jordan@embeint.com>
With the UART transport test (sample.tracing.transport.uart),
it would fail on qemu_x86_64 complaining about missing
k_event tracing functions. So add them to fix the compilation
error.
Fixes#96818
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Rename these three macros to an unprefixed lower-case variant. This is
normally not done for Zephyr macros (see container_of) but in this case
it seems like a good idea to adopt the lowercase names to:
1. have the same convention as the equivalent Linux macros, helping devs
working cross project recognizing (mis)use patterns.
2. make it somewhat intuitive that the lowercase ones are meant to be
used in functions while the uppercase ones are to be used for static
evaluation.
Add few c++ guards to avoid colliding with std::min and std::max.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
only switch to 4 bit mode, if it is supported
by the host. for MMC it is already checked,
but not for the sd card.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Adds assert for bt_bap_iso_bind_ep to ensure that endpoints
from different connection don't share a CIS (a bt_bap_iso).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a check that verifies that 2 endpoints from different
connection don't share a CIS, which would be invalid.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
We can actually already when we bind the endpoint to the stream
perform the call to bt_bap_iso_bind_ep, if the stream has been
added to a group.
If the stream has not yet been added to a group, then when
the stream is added to a group, then bt_bap_iso_bind_ep will
be done there (existing behavior).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
commands should not have spaces around hyphens:
version - extended --> version-extended
build - version --> build-version
Fixes: zephyrproject-rtos/zephyr#96591
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
If the process does an exec() (or fork, or..) all descriptors are kept
open by default, unless O_CLOEXEC is set when opening them.
This is usefull for stdin/out/err so that new process is connected to
them, but it is very rare for it to be usefull for any other descriptor.
In general this leads to descriptors being kept open unnecessarily,
which either will block other process from getting them (for example
if the child survives the parent but it does something else).
Or for a "leak" which unnecessarily uses descriptors and memory in the
child process.
Let's ensure we do not leak it for this component as we do not need it.
Note glibc fopen supports the "e" modifier as an extension to pass
O_CLOEXEC to the open syscall.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
REQUEST_QUEUE was passed as queue_num to virtio_init_virtqueues
where REQUEST_QUEUE+1 was required
Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
Zephyr crashes when a new websocket connection is refused by the
user supplied callback function. This is caused by multiple calls
of close_client_connection(). After the first call the file handle
and the client->service pointer are invalid.
This fix checks if the file handle is valid.
Signed-off-by: Andreas Schweigstill <andreas@schweigstill.de>
DSA switch performs L2 switching on hardware on DSA user ports.
The promisc mode requirement doesn't apply to DSA user ports.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reason for this extension are CRC mismatches happening due to RX data
loss when using the interrupt driven API at higher speeds and/or high
CPU load. It is recommended to use the ASYNC API along with hardware
byte counting requiring a timer instance and one PPI channel to achieve
a robust communication at high baudrates on nRF platforms.
Signed-off-by: Anouar Raddaoui <a.raddaoui@smight.com>
Add __printf_like attribute to ztest assertion functions
zassert, zassume, zexpect to validate format strings and arguments
at compile time.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>