Add new TLS socket option, TLS_CERT_VERIFY_CALLBACK, which allows to
register an application callback to verify certificates obtained during
the TLS handshake.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Extract server configuration, client configuration and test shutdown
into separate functions so that they're reusable in other tests.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add new TLS socket option, TLS_CERT_VERIFY_RESULT, to obtain the
certificate verification result from the most recent handshake on the
socket. The option works if TLS_PEER_VERIFY_OPTIONAL was set on the
socket, in which case the handshake may succeed even if certificate
verification fails.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Convert the enable, pwm, and retention `gpios` properties away from the
GPIO specifier space to an integer array.
While this is a less specific type than the GPIO property, it has the
advantage of not requiring the PMIC gpios node to be both present and
enabled.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Make the image devicetrees available to sysbuild for advanced use cases.
This is done by calling `zephyr_dt_import` on each image target. The DT
target properties are all expected to be prefixed with `DT_`, so there
should be no conflicts.
Thus, the DT contents of a given `<image>` can be retrieved using e.g.:
dt_nodelabel(<var> NODELABEL <label> TARGET <image>)
as noted in `extensions.cmake`.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
The CMake dt_* API is backed by target properties. By default, it uses
the target named `devicetree_target` that is initialized in `dts.cmake`.
We should be able to customize this, now that we have a function for
loading those properties into a different target. For example:
zephyr_dt_import(EDT_PICKLE_FILE /path/to/edt.pickle TARGET target)
dt_nodelabel(node NODELABEL label TARGET target)
This would make it possible to reference multiple devicetrees in the
same build system, particularly sysbuild.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Extract the part of `dts.cmake` that invokes `gen_dts_cmake.py`, then
generalize it into a CMake extension, which can be reused by sysbuild.
The Python script itself is also updated, so that the generated CMake
file can accept an input variable DEVICETREE_TARGET, which comes from
the `zephyr_dt_import(TARGET ...)` argument.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Add support for using native sockets with the connectivity API. This
allows libraries that use the connectivity API to be tested in an
application with real connectivity, without external hardware.
Signed-off-by: Jordan Yates <jordan@embeint.com>
This commit removes the SHI enable in the initialization. It can be
enabled by the application explicitly calling it when needed. The SHI
backend relies on the application layer to provide a data buffer for EC
Host Commands. If SHI is enabled before this buffer is initialized,
there is a risk that the driver may access a NULL buffer, leading to a
system panic.
Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
When calculating accel and gyro period for 12.5Hz, the frequency value is
incorrect. Updated to correct value.
Signed-off-by: Yau-ming Leung <ymleung314@gmail.com>
PIN9 of an ICM42688 can be configured as an interrupt output, external
clock input or frame sync output. Pin function can now be set via a sensor
attribute.
Signed-off-by: Yau-ming Leung <ymleung314@gmail.com>
Don't reference `net_if_get_by_iface` if `CONFIG_NET_RAW_MODE=y`, since
`net_if.c` is not compiled in that case, leading to linker errors.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The ECLAIR service STD.emptrecd (which checks for empty structures) is now
deprecated.
Use STD.anonstct (which checks for structures with no named
members, an UB in C99)
Based on a change by Nicola Vetrini in the Xen project:
https://lists.xenproject.org/archives/html/xen-changelog/2024-12/msg00125.html
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The current procedure to initialize the GPIO is:
If the GPIO is configured as GPIO_OUTPUT and also has the
GPIO_OUTPUT_INIT_HIGH flag, set it to output high; otherwise, set it to
output low.
This may fail if the GPIO is simply configured as GPIO_OUTPUT without
specifying either INIT_HIGH or INIT_LOW, which means it is intended to
preserve the previous status. But in this case, we are currently setting it
to output low.
Fix this by explicitly initializing the GPIO to high or low according to
the configuration:
If the GPIO is configured as GPIO_OUTPUT and also with the
GPIO_OUTPUT_INIT_HIGH flag, set it to output high.
If the GPIO is configured as GPIO_OUTPUT and also with the
GPIO_OUTPUT_INIT_LOW flag, set it to output low.
If the GPIO is configured as GPIO_OUTPUT only,
do not set the output value.
Signed-off-by: Benson Huang <benson7633769@gmail.com>
Enabling CCDEV_SEL_EN may interfere with the expected behavior of
VCC1_RST#.
To prevent potential issues, this commit sets CCDEV_SEL_EN
to be disabled by default, ensuring reliable VCC1_RST# behavior.
Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
The AXP2101 chip is a multi functional power chip offering a regulator,
charge controller and a fuel gauge (battery percentage and voltage).
Hereby, the fuel gauge provides much more reliable data compared to using
an ADC.
We implement minimal support for this chip (connected state, voltage and
gauge) and bind it to the fuel gauge subsystem.
Closes: #89158
Signed-off-by: Felix Moessbauer <felix.moessbauer@gmail.com>
led_context.h contains a single struct with max and min period, current
drivers that use it have hardcoded values and they set it at init.
This data is not used anywhere, and it makes very little sense to use
some SRAM for it.
Hardcode the limit for each driver and drop the struct and file.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add common structure for RTxxx AMP samples. Add amp_blink, amp_mbox,
amp_audio_output and amp_audio_loopback samples.
These samples are now configured only for the mimxrt685_evk, but are
intended to support other NXP microcontrollers with Xtensa-family cores
at a later date.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Picolibc changed things like _WANT_MINIMAL_IO_LONG_LONG to
__IO_MINIMAL_LONG_LONG in an attempt to regularize the exposed names and
eliminate names that weren't prefixed with even a single underscore.
Adapt to this change by looking for both old and new symbols.
Signed-off-by: Keith Packard <keithp@keithp.com>
When building POSIX code, we need to use picolibc's limits.h instead of
manually defining the POSIX values. This avoids duplicate definitions of
these symbols.
Signed-off-by: Keith Packard <keithp@keithp.com>
Add definitions and init code for mimxrt685_evk/mimxrt685s/hifi4 (i.MX
RT685's HiFi 4 DSP core on MIMXRT685-EVK).
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Exclude fsl_power.c from DSP domains, as it doesn't compile on those
because of missing register definitions. Include fsl_dsp.c wherever it
can be included, as it's required for initialisation of DSP domains.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Repoint hal_nxp to a new revision, which reflects changes needed for
mimxrt685_evk/mimxrt685s/hifi4.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Adds missing RAM to qemu_x86 boards .yaml files, as well
as llext tag to only_tags to get llext tests to run on a subset
of x86 QEMU targets.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>