Implement vendor specific
z_nrf_clock_bt_ctlr_hf_get_startup_time_us() which gets the startup
time of the high frequency clock used for Bluetooth.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
some current sense amplifiers have a non zero offset voltage
that correlates to zero current. adding this offset voltage binding
allows the driver to be used with this type of circuitry.
Signed-off-by: Brandon Allen <brandon.allen@exacttechnology.com>
Previously, hawkbit interface only supported a url/hostname and a port,
and internally it resolves to an IP address. This does not work for
network layers that rely on NAT64, like OpenThread. Zephyr's
implementation of `getaddrinfo` is not aware of NAT64. DNS will resolve
an IPV4 address that needs to be converted to IPV6 with the NAT64
prefix.
This commit alters the Hawkbit interface to allow providing an explicit
domain name as a string via `server_domain`, and an already resolved IP
address as `server_addr`.
This commit changes the usage of `hawkbit_runtime_config.server_addr` to
point to either an IP address or domain name. It adds a new Kconfig
(`HAWKBIT_USE_DOMAIN_NAME`) to specify an explicit domain name and adds
a new variable `hawkbit_runtime_config.server_domain`. If
`HAWKBIT_USE_DOMAIN_NAME` is enabled and a user provides an IP address
to `server_addr`, the user must provide a domain name to
`server_domain`.
Signed-off-by: Neal Jackson <neal@blueirislabs.com>
It is possible to manually set link address length past 6 at runtime
and trying to check IPv6 ll address that way. This should fail
as we could read two bytes past the address buffer.
Coverity-CID: 516242
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Add Set_WP function to set SPI flash WP line to low
Add Get_WP function to obtain status of the SPI flash WP line
Signed-off-by: Benson Huang <benson7633769@gmail.com>
The FLEXCOM offers several serial communication protocols that are
managed by the three sub-modules USART, SPI, and TWI (I2C).
Signed-off-by: Tony Han <tony.han@microchip.com>
Protect video API functions via __ASSERT_NO_MSG call to ensure that
required pointers are valid when entering functions.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Some API function pointer types such as set/get_format(),
set/get_frmival() are indentical. Combine them to save some spaces.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Async now uses its own work queue, which means it consumes more
resources. Since not all applications need the async API, we can make
it optional without any penalty for those applications.
Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
This commit adds a `strnlen` length check for `server_addr` to ensure that
it will not be truncated and result in a silent failure. Instead, the
call to `hawkbit_set_config` will return -EINVAL if the supplied
`server_addr` is too long for the internal buffer.
Signed-off-by: Neal Jackson <neal@blueirislabs.com>
Updated set_drp_toggle to handle differences in TCPCI revisions.
Added a macro for TCPCI revision and read it from the chip register
during initialization.
Signed-off-by: Jianxiong Gu <jianxiong.gu@outlook.com>
When both CONFIG_NET_IPV6_DAD and CONFIG_NET_IPV4_ACD are disabled, the
anonymous union in struct net_if_addr ends up with no members, which
results in a different struct layout between C and C++.
In C, an empty union has size 0, while in C++ it has size >=1, which
shifts the offsets of the following fields.
Add a 1-byte dummy member to the union to ensure consistent layout
across both compilers.
Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
Added IAR support to the macros ARCH_ISR_DIAG_OFF and
ARCH_ISR_DIAG_ON and updated the IAR warning macros.
Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
The IAR C/C++ compiler can't resolve a cast on a pointer
to a constant expression. This is used in the
_ARCH_MEM_PARTITION_ALIGN_CHECK macro.
This fix checks if an IAR compiler is used and disables the
start-alignment check if it is.
This was already fixed for v7 in rev d34d554d.
Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
Update the response callback function signature to allow the callback to
return an error code, which in turn will cause the HTTP client to abort
the download.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Same error had to be fixed in the branch where optimizations were done.
This is probably a good example of where using `if (IS_ENABLED()) ...`
is a better choice than using `#ifdef`. Because the compiler would have
caught this error last time as well.
Anyway, same problem - different line(s)!
A warning was propogated to error when building for
native_sim/native.
```
timeutil.h:682:17: error: result of comparison of constant \
-9223372036854775808 with expression of type '__time_t' (aka 'long') \
is always false [-Werror,-Wtautological-constant-out-of-range-compare]
timeutil.h:680:17: error: result of comparison of constant \
-9223372036854775808 with expression of type '__time_t' (aka 'long') \
is always false [-Werror,-Wtautological-constant-out-of-range-compare]
```
This is due to the issue described in #90029.
Add workarounds for `timespec_to_timeout()` and `timespec_negate()`
until 90029 is resolved.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
With Clang you can't set long_call attribute on function basis. Instead
of converting all calls to long calls let the linker create veneers when
necessary.
Signed-off-by: Veijo Pesonen <veijo.pesonen@alifsemi.com>
A warning was propogated to error when building for
native_sim/native.
```
timeutil.h:519:17: error: result of comparison of constant \
-9223372036854775808 with expression of type '__time_t' (aka 'long') \
is always false [-Werror,-Wtautological-constant-out-of-range-compare]
```
This is due to the issue described in #90029.
Add workarounds for `timespec_to_timeout()` and `timespec_negate()`
until 90029 is resolved.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add a number of utility functions for manipulating struct timespec.
* timespec_add()
* timespec_compare()
* timespec_equal()
* timespec_is_valid()
* timespec_negate()
* timespec_normalize()
* timespec_sub()
* timespec_from_timeout()
* timespec_to_timeout()
If the `__builtin_add_overflow()` function is available, then the
API is mostly branchless, which should provide decent performance on
systems with an instruction cache and branch prediction. Otherwise,
manually written alternatives exist that are also perhaps more
readable.
The two functions at the end convert time durations between
representation as `struct timespec` and `k_timeout_t`.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
struct usb_setup_packet represents the setup data payload of a USB control
message which is exactly 8-bytes in length.
On a legacy build of GCC 4.1.2 for an OpenRISC-like architecture it was
found that the compiler added padding after the bmRequestType anonymous
union, and subsequently the bRequest field causing the structure to be
padded to 12-bytes in length with the fields incorrectly laid out.
This patch corrects the issue by applying the __packed attribute to the
anonymous union. This corrects the issue.
The __packed attribute is also applied to the outer structure for the sake
of consistency.
Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
Add an IPC service API for triggering updates of the Nordic IRONside SE
firmware using the IRONside call module.
Co-authored-by: Håkon Amundsen <haakon.amundsen@nordicsemi.no>
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
Add an IPC service API for booting local domain cores.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
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>
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>
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>
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 the definitions of the PLL2 and PLL3 outputs for the stm32H7RS mcus
and the HCLK 5 which is clock source for the XSPI instance.
and other HCLKn for other peripherals.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Receive buffer must be aligned to word when
CONFIG_MODEM_BACKEND_UART_ASYNC_HWFC=y is set.
Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no>
Add the nxp,rtxxx-dsp-ctrl driver.
Responsibility of this driver is to load code executed by Xtensa-family
cores on NXP i.MX RTxxx microcontrollers and to control their run.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Added a pinctrl driver support for MSPM0 Family.
Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
Signed-off-by: Jackson Farley <j-farley@ti.com>
Connection manager enforces non-blocking disconnect() behavior, yet in
case CONN_MGR_IF_NO_AUTO_DOWN flag is not set, it'd put the interface
down right after, disrupting the disconnect process.
As putting the interface down can be handled in the corresponding event
handler as well, when the interface is actually disconnected, remove the
conn_mgr_conn_if_auto_admin_down() call from conn_mgr_if_disconnect().
To make this work with persistence flag, introduce a new internal flag
indicating that the interface is in active disconnect.
Finally, since it isn't really necessary that disconnect() API call is
non-blocking, remove that requirement.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add missing curly braces in if/while/for statements.
This is a style guideline we have that was not enforced in CI. All
issues fixed here were detected by sonarqube SCA.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>