Add modem_cellular driver to build_all. Since the driver
is generic, supporting 4 different modems, it builds an
instance for all 4 as they exist in the devicetree.
Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
The tests test each module independently using the mock pipe,
which implements the modem_pipe API, making it compatible
with the modem modules.
The modem_ppp module is slightly different from the others
since it also interacts with the network stack. To acheive
this, a mock implementation of the PPP L2 net iface has
been implemented in the test suite for the modem_ppp.
Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
bt_l2cap_chan_send returns the total bytes sent from the buf,
hence test should only fail when it returns a negative error code
and not a positive number of bytes sent.
Signed-off-by: Tom Finet <tom.codeninja@gmail.com>
Fix a bunch of mismatched CONTAINER_OF, few missing
k_work_delayable_from_work conversions but also many
bt_l2cap_le_chan/bt_l2cap_chan and few others.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
rp_enc_state_wait_ltk_reply() is executed in thread context, so
it is not allowed to move the encryption state machine forward.
Defer LTK reply handling to next prepare event by introducing a continue
state.
Update the unit test to reflect this, and remove the TODO that actually
said there was an issue in the first place.
Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
Fix few mismatched CONTAINER_OF, going from struct k_work to struct
triggered_test_item should pass by struct k_work_poll.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add ability to retrieve the shunt voltage if the end user wants to do
the power calculation manually to handle negative power values.
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
The current-shunt calibration requires a factor of 4x if high-precision
mode is selected.
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
Fix current sign extension logic and consolidate sensor scaling code
into a single block.
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
The connectivity monitoring subfeature of conn_mgr is currently also
named conn_mgr, which is confusing.
This commit renames it to conn_mgr_monitor, or conn_mgr_mon for short,
for clarity.
Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
Splits many definitions from conn_mgr_connectivity.h off into their own
header, conn_mgr_connectivity_impl.h
conn_mgr_connectivity.h now focuses solely on user/application-facing
APIs, and conn_mgr_connectivity_impl now contains all functions, utils,
definitions intended for use by connectivity implementations, including
conn_mgr_if_get_binding, which is now available for use by connectivity
implementations.
This lays the foundation for allowing connectivity implementations
easier and safer access to their internal state through internal APIs.
Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
Adds a target RPA known unknown cache; it fulfills a similar function
to the existing peer RPA cache, used for scanning of directed
advertisements
Signed-off-by: Troels Nilsson <trnn@demant.com>
Remove the qos field from
bt_cap_unicast_audio_start_stream_param as it was not used.
The QOS values are set when creating the unicast group,
and not when starting the streams.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Adjust the `runtime_observers_registration` and `unittests` tests to work
with iterable sections channel observation. Add a sequence check for the
runtime observers. Add a tests for iterator functions for channels and
observer to work with `user_data` pointer.
Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
Tests should depend on the the module, so if we do not have the module,
we should not be building the test.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The main.cpp was introduced as a symbolic link of main.c
but this makes the test build failure on Windows, so just
remove the symlink and include directly the source
Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
Refactor the bt_audio_codec_cfg to use flat arrays to store
metadata and codec specific configurations.
The purpose of this is to make it easier to copy the data
between layers, but also to support non-LTV data for non-LC3
codec configurations.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Added a BSIM tests for PACS notification functionality. This test
tests that all optional notifies are working, as well as verifying
that a disconnected subscribed client will be notified on reconnect.
Signed-off-by: Fredrik Danebjer <frdn@demant.com>
Added Kconfig options to make the various PACS characteristics that are
optionally notifiable selectable as notifiable. Selecting a
characteristic as notifiable will make it so for all pacs instance on
the device.
Signed-off-by: Fredrik Danebjer <frdn@demant.com>
Fix few instances of delayable work handlers using the k_work pointer
directly in a CONTAINER_OF pointing to a k_work_delayable.
This is harmless since the k_work is the first element in
k_work_delayable, but using k_work_delayable_from_work is the right way
of handling it.
Change a couple of explicit CONTAINER_OF doing the same work as the
macro in the process.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add tests which verify that getsockname() function works as expected.
Additionally, add a teardown delay in tests involving TCP, to make sure
all resources are released before the test ends, not to interfere with
other tests.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Enables building the test application with settings management
group enabled to ensure it builds successfully.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Add test cases which verify that when UDP socket is connected, it only
accepts datagrams from a remote peer it was connected to, and not
others.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Change the emulator stub driver priority to
CONFIG_KERNEL_INIT_PRIORITY_DEVICE. Makes this play well with build time
priority checking.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add module tests for all data types and most of deprecated
functions as well.
Refactor event wainting to expect_lwm2m_rd_client_event() which
does not care about the index, just the order.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
CONFIG_COVERAGE has been incorrectly used to
change other kconfig options (stack sizes, etc)
code defaults, as well as some samples behaviour,
which should not have dependend on it.
Instead those should have depended on COVERAGE_GCOV,
which, being the one which adds special code and
temporary RAM storage for embedded targets,
require changes to many features.
When building for the native targets, all this was
unnecessary.
=> Fix the dependency.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
CONFIG_NOCACHE_MEMORY is a valid way of declaring buffers in
nocache regions. Consider them valid in the stm32 SPI driver
nocache check. Also, don't check NULL buffers as the SPI
interface states that such buffers will result in sending
zeroes.
Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>