In the USBD_DESC_STRING_DEFINE macro defenition the const qualifier is
missing. Also, do not reserve room for the UTF16LE conversion, as this
is done on the fly in the stack.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Currently the config CLOCK_CONTROL_NRF2 is used as a GLOB
style config which includes all "NRF2" drivers and related
configs.
With NRF2, clocks are treated as individidual devices
with individual device drivers. This commit split the
CLOCK_CONTROL_NRF2 config into device specific configs
and ifdefs. With this, drivers are selected individually
based on devicetree state as is common for most devices
drivers, and dependencies like NRFS and specific NRFS
services are selected by the specific driver which nees it.
Checks for CLOCK_CONTROL_NRF2 are updated to check for
existance of the clocks instead.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Fix the description of nrf_clock_control_get_startup_time which was
missing documentation of the spec param and had a spelling mistake
in it.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Add ELC nodes to RA SoC DTS files and provide
device-specific ELC signal enums for Devicetree bindings
Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
In high throughput tests it's fairly easy to overflow the current 32-bit
byte counters in net statistics (it's just over 4 GB of data).
Therefore, make the byte counters 64-bit to prevent overflows.
Rearrange some fields to avoid padding.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Converting absolute system ticks to RTC ticks is simple. It needs to be
multiplied by CYC_PER_TICK (which by default is 1). Complex algorithm
was used when driver was not tracking current 64 bit tick and function
was returning uint32_t.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
On arrays DT_ENUM_HAS_VALUE() and DT_INST_ENUM_HAS_VALUE()
were only checking the first index, this changes it to check all indexes.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
This is a follow-up to commit 7a2ce2882a.
Inclusion of <hal/nrf_clock.h> should not be done based on the NRF_CLOCK
symbol being defined, because it depends on the order in which headers
are included - that symbol gets defined when <nrfx.h> gets included and
this is not necessarily always happening earlier. Instead of adding
inclusion of <nrfx.h> here, move inclusion of <hal/nrf_clock.h> under
`#if defined(CONFIG_CLOCK_CONTROL_NRF)` where it is actually needed.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add new socket offloading functions, allowing to enable/disable
offloaded DNS implementation at runtime. This may be useful if there is
a mix of offloaded/native network interfaces in the system, so the
application can choose which DNS backend to use.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add a new "if_name" pointer to the transport configuration structure,
allowing the application to bind MQTT client to a specific network
interface.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Some tests explicitly test for deprecated functions and they
override the macro __deprecated to avoid compiler warnings.
So, for xcc/xt-clang, only define __deprecated if it has not
already been defined.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
remove phy related configs from eth config.
phy related configs chould go directly into the phy.
Most ethernet drivers didn't support the now removed
functions yet. Users should instead use `phy_configure_link()`
together with the `net_eth_get_phy()` function.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Casting a char* to a struct* requires checking alignment as this can fail
on platforms requiring strict alignment (ex. Xtensa)
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
When CONFIG_TIMEOUT_64BIT is y, positive values are relative/delta
timeouts and negative values are absolute timeouts, except
for two special values. -1 is K_WAIT_FOREVER and 0 is K_NO_WAIT.
The reserved value of -1 means INT64_MAX is not a valid argument
to K_TIMEOUT_ABS_TICKS(), but there was no check. If a literal
was passed, a preprocessor/compiler warning would be generated
for overflow, but if a variable was passed as the argument,
then the code would compile but not work correctly since the
absolute timeout would be changed to a relative one. One
example of this is task_wdt_init() if no channels are enabled.
Rather than just fixing task_wdt, and trying to find other cases
in an adhoc way, this CL changes K_TIMEOUT_ABS_TICKS() to
limit the larges value to (INT64_MAX-1). It does so silently,
but given the range of int64_t, there should be no practical
difference.
Also, change the implementation for Z_IS_TIMEOUT_RELATIVE() to
fix the case where INT64_MAX relative timeout was being
improperly reported as being not a relative timeout. This was
again due to the -1 reserved value.
Add some tests for these changes to the timer_api test.
Signed-off-by: Mike J. Chen <mjchen@google.com>
In order to enable better and more consistent help messages for shell
commands, this commit introduces a new SHELL_HELP macro that allows to
document a command's description and usage in a more structured way.
This will allow to get rid of inconsistent (and duplicated!) variations
of "Syntax: ...", "Syntax:\n ...", "Usage: ...", in the commands, and
formatting of the description+usage will be taken care of by the shell
when it detects the help message is using the "structured" format.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
`DT_SAME_NODE()` is judged by `==` and cannot be used as
a condition for `COND_CODE_1()`.
Using `IS_EQ()` to make it possible for compile-time
calculation.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Placing this in RAMABLE_REGION messes up the TLS offsets computed by the
linker, presumably because it's not adjacent to the .tdata section.
In any case, it doesn't really matter as all we want the linker to do is
compute offsets from the TLS base value for all .tdata and .tbss values.
Signed-off-by: Keith Packard <keithp@keithp.com>
When not using dynamic interrupt mapping, various interrupt tables are
configured to be stored in read-only memory in the linker script.. Mark
them const so that the linker doesn't complain.
This affects _sw_isr_table, _irq_vector_table, and z_shared_sw_isr_table in
arch/common along with _VectorTable in arch/arc.
Signed-off-by: Keith Packard <keithp@keithp.com>
If this section is placed in FLASH, the section gets marked
as writable even though .tbss values will never be stored there.
Signed-off-by: Keith Packard <keithp@keithp.com>
The mode is activated by the CONFIG_MODBUS_NONCOMPLIANT_SERIAL_MODE option
and allows any stop-bit setting for the serial port.
Signed-off-by: Maksim Salau <msalau@iotecha.com>
Some applications need to save LLEXT context, e.g. when suspending,
to later restore it quickly without a full relinking. Add 2 functions
for context saving and restoring. Since these functions are likely to
change in the future, put them in llext_experimental.c, which depends
on CONFIG_LLEXT_EXPERIMENTAL and is disabled by default.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Beginning symbols or structure field names with an underscore isn't a
widely used style in Zephyr, remove the leading underscore from
_llext_list.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
NATIVE_APPLICATION is now deprecated so nobody will set it,
but NATIVE_BUILD should cover the same case this build error
is trying to warn about. Let's use it instead.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Soft ap supports WIFI_BTWT_AGREEMENT_MAX BTWT sessions.
The BTWT parameters for each session can be different.
The current usage can only set one set of parameters.
All sessions follow this set of parameters.
Add enhance code to support setting different
BTWT parameters for every sessions.
Usage:
wifi twt btwt_setup <sta_wait> <offset>
<twtli> <session_num>
<id0> <mantissa0> <exponent0> <nominal_wake0>
<id1> <mantissa1> <exponent1> <nominal_wake1>
<idx> <mantissax> <exponentx> <nominal_wakex>
The total number of '0, 1, ..., x' is session_num
For example:
wifi twt btwt_setup 0 0 0 2 0 112 10 128 1 32 10 64
Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
Renames LED_BRIGTHNESS_MAX to LED_BRIGHTNESS_MAX in led.h and all
in-tree users of the macro.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Fixes an error:
error: designator order for field 'http_service_desc::backlog'
does not match declaration order in 'const http_service_desc'
When compiled for C++
Signed-off-by: Pavel Maloletkov <pavllick@gmail.com>
Add MPS4 pinctrl support by referring to
`mps4/common/partition/platform_base_address.h`
from TF-M's main branch.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Add a family of functions that convert to microvolts instead of
millivolts. The resolution of an ADC with a 600 mV reference and a 12
bit output (nRF SAADC for example) is an order of magnitude better than
millivolts (0.146 mV), even before considering non-unity gains.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Introduce a binary min-heap implementation as a generic data structure
for use in kernel and application code. A min-heap always maintains
the smallest element at the root, making insertion and removal of the
minimum element efficient (O(log n)).
The API allows both static and dynamic initialization, supports custom
comparators.
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Add RTIO async and RTIO stream functionalities that enables,
among all the other things, the sensor data streaming from FIFO.
RTIO stream supports following triggers:
- SENSOR_TRIG_FIFO_WATERMARK
- SENSOR_TRIG_FIFO_FULL
- SENSOR_TRIG_DATA_READY
Following FIFO parameters has to be defined in device tree to
correctly stream sensor data:
- fifo-watermark
- accel-fifo-batch-rate
Currently the driver can decode FIFO content with Accelerometer
16-bit samples.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Fix the net_pkt_pull() documentation and mention that the
function can remove data from the start of the network packet.
The function is meant to work similar way net_buf_pull() but
it can handle multiple net_buf fragments.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The documentation did not state clearly that any zero-latency IRQ must
also be declared as a direct ISR. This is critical because failure to do
so may cause race conditions between the ZLI and regular ISRs when
executing the preable/postamble code in regular interrupts.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Adds macros to be able to use the microcontroller clock output (MCO) on the
STM32G0 microcontroller.
Signed-off-by: Andreas Schuster <andreas.schuster@schuam.de>
Add weak functions and their call within the dcmipp driver so that
externally provided ISP control functions can be called by the
driver at right timing in order to perform the control of the
ISP part of the DCMIPP.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>