ESP32 SoC has multiple revisions, some of which are not supported
by the current implementation, as such as REV0 and REV1. This PR
adds an option to indicate user that this is not recommended and not
supported.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Check if lines from serial are processed one by one
in case when was received in one buffer from redline method.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Readline method sometimes receives more lines in buffer.
Split them to avoid misinterpreting data in harness module.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
The ENABLED_SECTION option is not a YES/NO option but should
contain a list of section label to be processed. For example,
adding INTERNAL_HIDDEN will make doxygen to look through all
the blocks with "@cond INTERNAL_HIDDEN" and "@endcond". So
just remove the "YES" and leave it an empty list.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This moves the #ifdef to enclose the associated doxygen block.
Or else the function prototype are ignored/skipped but doxygen
still processes the block, and it will apply the documentation
to the next function in the file... and it will complain about
parameters not being found.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Building with NEWLIBC triggers warnings about
snprintf since stdio is no longer automatically
included by printk.h
This PR switches to using snprintk to avoid these
warnings.
Fixes#77330
Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
The heltec_wireless_stick_lite_v3 board does not properly handle
receive operations when the SPI used to communicate with onboard SX1262 has
the clock frequency set too high. This causes radio recv operation to
almost always hang forever without any error, as the SX1262 module returns
0xFF00 value as the interrupt status which does not make any sense, thus
causing the LoRaWAN library to trigger RXTX timeout handler which in the
current SX1262 driver implementation is not privded. The issue occurs
almost always, sometimes allowing to receive few (3-5) tranmissions
correctly, then fail. The root of the problem is not known for sure, but it
is highly likely a board's limitation, though not confirmed by the
manufacturer.
The current SPI frequency was chosen arbitrarily based on the conducted
experiments where the 30 000 messages have been received continiously
without any problems (with 5s interval for each message).
Signed-off-by: Patryk Biel <pbiel7@gmail.com>
Currently, the test doesn't clear the control data buffer before
calling recvmsg. This leads to recvmsg being unable to add the new
control data, which corresponds to the current received data.
This commit aims to clear the control data buffer to match most use
cases, when the control data buffer is empty before calling recvmsg.
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
According to recvmsg man page, msg_controllen should be set to the sum
of the length of all control messages in the buffer.
This is missing from the current recvmsg implementation.
This commit aims to fix this by updating msg_controllen each time control
data are added to the buffer.
This commit also fixes cases where the msg_controllen is cleared
incorrectly.
Fixes#77303
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Use pytest-args parameters provided in command line after
parameters taken from yaml file. The last occurence is
considered by argparse, so parameters from command line
will be used.
Fixes: #77319
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Fixes division by zero exception when SPI is configured to operate in mode3
whit CS controlled by software.
Such exception occurred because data->dfs is listed as the denominator in
a division inside the spi_esp32_transfer() function which is called from
spi_esp32_configure() (before assigning a value to data->dfs) inside
transceive() in the condition where mode 3 is chosen as the SPI operating
mode and the chip select is configured to be software-controlled.
Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
Run clang-format on drivers/led/lp5569.c to align formatting in the file.
No functional changes intended.
Signed-off-by: Emil Dahl Juhl <emdj@bang-olufsen.dk>
The lp5569 features a double functioning pin for enable and pwm control.
The chip, however, uses the first rising edge to initialize and get ready
for i2c communication, and then the pin alters function to pwm mode.
Add support for providing enable-gpios to the lp5569 in the dts, which
will make sure to assert the pin and wait for the chip to initialize
before attempting further configuration of the chip.
Signed-off-by: Emil Juhl <emdj@bang-olufsen.dk>
The lp5569 controller contains an internal charge pump which can be useful
for driving LEDs with a forward voltage greater than the lp5569 supply.
Taking advantage of the charge pump can alleviate the need for an external
boost converter.
Add a dts property, charge-pump-mode, to the ti,lp5569 binding with which
the cp_mode bits of the MISC register will be configured.
Following the datasheet, the possible configurations are:
0x00 -> disabled (default)
0x01 -> 1x mode
0x10 -> 1.5x mode
0x11 -> auto mode
Signed-off-by: Emil Juhl <emdj@bang-olufsen.dk>
Introduces the test for testing the new functionality
of ztest shell.
Passing -r (repeat iter) parameter. This allows to run
a particula testcase or testsuite several times.
Passing -p (any value) parameter. This allows to provide
a parameter to a test at runtime.
Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
Expanding the ZTEST shell to include a command that
accepts additional parameters, such as ztest run_testcase
<suite:test> -p any_value.
Adding the new ZTEST_P macro, to create the
parameterized test.
Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
Expand ztest_shell subcommands `run-testcase`
and `run-testsuite` to include additional parameter `-r`
repeat-iter. This allows to run a particular testcase or
testsuite several times.
Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
Mark the POSIX_SIGNALS Option Group as supported to the extent
possible under Zephyr, as Zephyr does not yet support processes.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Since Zephyr itself does not currently support processes, but
conformant applications should still be able to link, add stubs
for the remaining POSIX functions in the POSIX_SIGNALS Option
Group.
The POSIX_SIGNALS Option Group is required for PSE51, PSE52,
PSE53, PSE54, and likely many other POSIX Subprofiles.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Newlib requires an alias for the getpid() function. There was
a Kconfig already present for doing so, but the actual alias
was missing.
So this is technically a bugfix.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The buffer flags MPSC_PBUF_FULL is a shared resource to determine
whether the buffer is available. When processing drop messages,
the flag will be cleared first and then set, add spin lock protection.
Signed-off-by: Xiaolu Sun <xiaolu.sun@intel.com>
Route `configure` and `recover_bus` through the RTIO framework to avoid
race conditions. Update `RTIO_OP_I2C_RECOVER` implementation to actually
recover the bus, instead of triggering a loop.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Incorrect value set by user when using sensor_attr_set can fail silently
since it always returns 0.
Fix by adding ret. Also added return on sensor_attr_get.
Signed-off-by: Aiman Mazlan <mohammad.aiman@stratusauto.com>
Initial CMake yaml module to facilitate reading yaml files into CMake,
update yaml settings and write it back to a file.
The yaml module also supports creation of yaml files from scratch.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Add a new zephyr_check_arguments_required_allow_empty() macro for
function argument validation.
Zephyr already has a zephyr_check_arguments_required() for checking
required arguments, like
zephyr_check_arguments_required(foo_func <prefix> FOO BAR)
which ensures that one of FOO or BAR are given in a call like:
foo_func(BAR val)
One limitation however, is that is some cases BAR may be allowed to be
empty, so that it's still possible to know if FOO or BAR were supplied.
In most case, BAR and FOO will have values following the keyword, like:
foo_func(BAR my_bar_val)
foo_func(FOO my_foo_val)
but in cases where `my_bar_val` is a variable which may be empty, like:
set(my_bar_val)
foo_func(BAR ${my_bar_val}) # (expands to: foo_func(BAR)
then BAR was actually supplied.
To support functions where such empty expansion is allowed, then a new
helper macro `zephyr_check_arguments_required_allow_empty()` has been
implemented, as to be able to distinguish `foo_func()` from
`foo_func(BAR)` when parsing arguments.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Toggling `CONFIG_USERSPACE` to `y` results in compilation
errors caused by the fact that various k_* functions don't
have their prototypes included in the SCMI sources (e.g:
`k_mutex_*`, `k_sem_*`, `k_is_pre_kernel()`).
To fix this, switch to using the `kernel.h` header instead
of `sys/mutex.h`. Previously, this worked because `sys/mutex.h`
included `kernel.h` if `CONFIG_USERSPACE` was set to `n`.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
When running on native_posix, the thread needs to be created
before the thread name can be set.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This will update the posix thread names to match
the zephyr thread names.
This will simplify debugging as the debugger will
recognize the thread names.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
The intention of this API is to allow setting the posix thread
name equal to the zephyr thread name.
By defining it as an arch interface, the implementation becomes
generic.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Newer Xtensa toolchain needs to include xtensa-types.h so that
macros in tie.h can be used without compilation errors.
The exact verison needing this is unknown but first encountered
in RJ-2023.2. Tested with older toolchain and that did not
cause any compilation errors so just include xtensa-types.h
if xt-clang is used. Haven't seen newer toolchains being
generated with xcc, so skip that for now.
Note that Zephyr SDK and the public HAL in Zephyr do not provide
this file.
Signed-off-by: Anthony Giardina <anthony.giardina@intel.com>
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The gtest 1.15 has slightly different output from the original one that
was used to set up the harness. With this change we support both output
formats.
Fixes#72318
Signed-off-by: Yuval Peress <peress@google.com>
Fixes the adxl345 accelerometer driver to return zero on sample fetch
success, as specified by the sensor driver API. Prior to this change,
the driver incorrectly returned a positive non-zero value on sample
fetch success, which in turn caused a bus fault getting data with the
sensor shell.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
Initialize the missing chunk field when canceling a BLOB Transfer.
If you canceled a BLOB Transfer, the missing_chunk was not cleared in
the next BLOB Transfer. This can make it look like there are still
missing chunks, even though all chunks in the block have already been
received, and it does cause bugs.
Signed-off-by: Junho Lee <tot0roprog@gmail.com>
IMXRT11XX secondary core should not deinit ENET PLL
as it could be configured by primary core.
Signed-off-by: Anders Bjørn Nedergaard <abn@polytech.com>
Add test suite for remove of zephyr native libc
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>