Fix building this sample on bl5340_dvk_cpuapp_ns and
pinnacle_100_dvk. On these boards the NORDIC_QSPI_NOR
driver needs to be enabled for the sample to build.
Signed-off-by: Kumar Gala <galak@kernel.org>
All in tree device drivers use some form of DEVICE_DT_GET
so we no longer need to require label properties.
Signed-off-by: Kumar Gala <galak@kernel.org>
Add alias to overlays for boards that switch the watchdog to be
used while running this sample.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Add alias to boards with watchdog enabled to facilitate the
move of samples/drivers/watchdog to use DT_ALIAS.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move watchdog0 and watchdog1 nodes from choosen to aliases for
consistency with other boards.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Enable watchdog in device tree in order to remove overlays
from samples/drivers/watchdog.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
All in tree device drivers use some form of DEVICE_DT_GET
so we no longer need to require label properties.
Signed-off-by: Kumar Gala <galak@kernel.org>
All in tree device drivers use some form of DEVICE_DT_GET
so we no longer need to require label properties.
Signed-off-by: Kumar Gala <galak@kernel.org>
The unicast client will now read the PACS location value
during the discovery procedure, as well as subscribing to
it.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The code in unicast_client.c was guarded by
CONFIG_BT_AUDIO_UNICAST_CLIENT but the file is only
compiled if CONFIG_BT_AUDIO_UNICAST_CLIENT is enabled.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Rename the cache from "cache" to "pac_cache" to avoid
name clashes with local cache variables.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The twim_config structure is no longer modified at runtime, so it can be
placed in driver's config (const).
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
TWIM peripheral needs to be disabled for bus recovery, otherwise SCL/SDA
lines will not be released. This patch makes sure to disable peripheral
if active, and, restore its state afterwards (including pin
configuration).
It is worth to note that a better solution would be to:
1. Define scl/sda pins as `-gpios` in DT
2. Use GPIO API in the driver to perform recovery (as some other drivers
do)
3. Potentially use a "gpio" pinctrl state for this case
Unfortunately HAL is doing everything under the hood, so we have little
options to improve this unless we don't use it for such case. GPIO based
recovery should likely be generalized as many drivers seem to replicate
such _algorithm_.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
When CONFIG_PM_DEVICE=n a device will always be in active state. Provide
a dummy implementation of pm_device_state_get that always returns
PM_DEVICE_STATE_ACTIVE.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Enable device runtime PM on the I2C driver. Note that this mechanism
replaces the old nrfx_twim_enable/disable calls with
pm_device_runtime_get/put, which means that driver will not save power
unless CONFIG_PM_DEVICE_RUNTIME=y.
Some quick measurements on thingy_52 running the samples/sensor/hts221
show a decrease of ~2-3uA in average when enabling device runtime PM.
Note that the driver already had implicit PM before, so the change for
users will be ~none, except that they now must enable the PM subsystem
features. While this case is not the best example, the PM subsystem will
turn to be beneficial as a whole when all devices in the board implement
it.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The device definition macro defined per-device init function, resulting
in a cluttered and hard to extend init function. Create a per-instance
IRQ connect function instead, which is called at init time by a common
function.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The driver already implemented some sort of runtime PM by
unconditionally calling nrfx_twim_disable/enable. Perform the same
operations in the PM callback instead of doing a full init/deinit every
time.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The driver re-initialized itself on the twim_transfer call if it wasn't.
This condition was likely added because of some manual/custom PM
schemes. Drop it in preparation for runtime PM.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
nrfx HAL does not support updating frequency at runtime, which means we
need to do a full init/deinit to update it when it is a matter of a
simple register write. Fix this by using the lower level HAL.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Following changes has been made by this commit:
- fix issue when a binary is not able to be found by relative path
- implement "west debug" command
- implement --dt-flash option
Signed-off-by: Alex Kolosov <rikorsev@gmail.com>
Added possibility to enforce that a LE Secure Connection is required
for reading and writing characteristics, i.e. providing a more fine
grained check that allows services that requires secure connection
to co-exists with those that doesn't.
Signed-off-by: Lars Knudsen <larsgk@gmail.com>
Signed-off-by: Fredrik Danebjer <fredrik@danebjer.com>
Move driver to use {NET_}DEVICE_DT_INST_DEFINE. This lets us
remove the IEEE802154_CC2520_DRV_NAME Kconfig symobl.
We also update the ieee802154 build_all test to actually enable
the CC2520 driver.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move driver to use {NET_}DEVICE_DT_INST_DEFINE. This lets us
remove the IEEE802154_B91_DRV_NAME Kconfig symobl.
Signed-off-by: Kumar Gala <galak@kernel.org>
Add support for running the SocketCAN sample on
native_posix/native_posix_64 using the CAN loopback interface.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Sometimes there is a need to interrupt mesh babblesim tests when
debugging or implementing new tests. Calling Ctrl-C doesn't work as it
only aborts the test script, but not the executables. This fix adds a
trap for Ctrl-C to kill all test instances run by the script.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
When compiling with '-Werror=missing-field-initializers', the cbprintf
header causes an error since 'off' isn't initialized.
Signed-off-by: Yuval Peress <peress@google.com>
The children are iterated over in the same order they appear in
zephyr.dts, but this isn't documented. Clarify the order.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This fixes commit
3d5cc38cf6.
That commit only works if removing the quotes from e.g. a string in an
array actually results in a token. If the string's value is something
like
"foo,bar"
though, it will result in the "token"
foo,bar
in the generated output.
This is wrong; fix it using the new edtlib.str_as_token() API
introduced to allow callers to perform the same procedure as that
library for fixing up strings.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Adding a comment at this point in the header file splits these macros
into their own section. They are presently grouped together with the
previous section, which is unrelated. This is confusing; fix it.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Some callers need to be able to convert strings to tokens in the same
way edtlib does. Make this possible by exposing the internal helper
function used to do that under a suitable name.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>