The CMD_CLEAR_RX and CMD_SET_TX_POWER commands are declared and
initialized but not used anywhere. They are therefore removed to reduce
RAM/flash footprint.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
Switch the driver to the soft CSMA/CA algorithm as an intermediate
compromise for improved standard compliance (namely expontential
backoff) until true hardware support can be implemented by chaining
radio commands.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
The driver's CCA method had various issues and would always return an
error code. This is fixed in this change.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
This change introduces inline documentation with references to the
current version of the IEEE 802.15.4 standard.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
The CC13xx/CC26xx Sub-GHz driver announces a hardware CSMA/CA capability
which it provides only partially. This change documents the gap.
The change also fixes two related issues with the current CCA
implementation:
- The given default ED threshold was above the allowed threshold
defined in the specification.
- The CCA timeout was not calculated according to the requirements
defined in the standard.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
This change introduces standard variable names used elsewhere in the
stack for improved naming consistency and readability.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
The driver contained references to KConfig variables w/o the required
CONFIG_ prefix. This change introduces the missing prefixes.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
The low-level configuration of the chip's radio commands was mostly
redundant. This change removes redundant configuration code.
This is also relevant as a preparation to supporting further frequency
bands and operating modes on the same SUN FSK channel page with
similar but slightly different settings (center frequencies, channel
spacing, modulation index as defined in the standard). The SUN FSK
standard defines plenty of such variations with different physical
characteristics and trade-offs. Such variations are highly relevant in
industrial applications which will be targeted by TSCH. Using the
correct settings is required for additional features (e.g. frequency
hopping) and interoperability.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
The CC13xx/CC26xx Sub-GHz driver header file defined several constants
that were not used in the driver.
Other constants could be replaced with generic constants which were
introduced in the prior commit.
This change removes and/or replaces redundant definitions.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
This change ensures that openthread network topology will be formed
properly, by delaing start of echo client application.
Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
The LittleFS sample may be used for both SDMMC and MMC disk drivers,
so make it possible to work with different volume disk driver names.
Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
Add a property to abstract the partial linking/rellocatable
linking for gcc ld and llvm's lld.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The extra ztest functionality for the posix arch
requires the host libC. Disable it if we are
building with an embedded libC.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The IRQ definition macros are common between the in-tree
POSIX arch boards.
Let's move it to a common (optional) header.
Other POSIX arch boards may still use their own definitions.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The SDL logic is not native_posix specific but can
be reused between posix arch boards.
Move it to a common folder so it can be reused in practice.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The native_tasks logic is unrelated to the remaining
of the soc logic (which handles CPU start/stopping)
refactor it out into its own file.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In some cases it is necessary to have a va_list version
of the posix tracing functions.
Provide the definitions, and their implementations
for the POSIX arch boards.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Let's remove the native_posix part from the SOC description
and just refer to "native".
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The native_tasks header requires the toolchain header.
Let's include it directly instead of requiring users
of this header to include it before.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The issue due to which we set the default compiler C std version
to C11 is not specific to any particular POSIX arch board,
but to all. Instead of setting this property for each board,
let's set it at the architecture level.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Include host headers only if we are building with
the host library for the POSIX architecture.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The POSIX API compatibility shim can be used for some
of the POSIX ARCH targets.
Narrow the Kconfig filtering accordingly.
Note that the recommended configuration when building
with the native simulator is still to use an embedded
C library. Using the host C library will in some cases
cause undesired behaviour.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Include the host timespec only if we are building with
the host library for the POSIX architecture.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Set the initialization priority for the pinctrl_mcux_init to
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT.
The pinmux nodes depend on pcc, which is currently initializing at a
later stage, using the default priority fixes it.
Found the error with:
$ west build -p -b frdm_k64f samples/basic/blinky \
-DCONFIG_CHECK_INIT_PRIORITIES=y
...
ERROR: /soc/pinmux@4004d000 PRE_KERNEL_1 0 <
/soc/pcc@40065000 PRE_KERNEL_1 30
ERROR: /soc/pinmux@4004c000 PRE_KERNEL_1 0 <
/soc/pcc@40065000 PRE_KERNEL_1 30
ERROR: /soc/pinmux@4004b000 PRE_KERNEL_1 0 <
/soc/pcc@40065000 PRE_KERNEL_1 30
ERROR: /soc/pinmux@4004a000 PRE_KERNEL_1 0 <
/soc/pcc@40065000 PRE_KERNEL_1 30
ERROR: /soc/pinmux@40049000 PRE_KERNEL_1 0 <
/soc/pcc@40065000 PRE_KERNEL_1 30
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Previous fix https://github.com/zephyrproject-rtos/zephyr/pull/58891
introduced failure in driver tests suite. This patch corrects the error
and reverts max_mapped_page field definition.
Adds max_mapped_pages stats reset after unmaping of unused memory.
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
Provide a sensible default for the POSIX architecture,
as now it is possible to build with it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The spin loop in _exit() needs a Z_SPIN_DELAY() for the
POSIX architecture, so it does not hang the whole
executable on that infinite loop but only the thread
that exit'ed.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The spin loop in _exit() needs a Z_SPIN_DELAY() for the
posix architecture, so it does not hang the whole
executable on that infinite loop but only the thread
that exit'ed.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
We have many tests that are marked as slow that do not run in CI and any
known workflow, to isolate them and be able to run them on their own,
add a new option --enable-slow-only which causes only those tests to build
and execute.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Make sure that `poll(..., POLLIN)` executed from another thread returns
when `eventfd_write()` is called. Test also the same with `poll(...,
POLLOUT)` and `eventfd_read()` on eventfd with counter equal to
`UINT64_MAX - 1`.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Fix a regression introduced by commit e6eb0a705b ("posix: eventfd: revise
locking, signaling, and allocation"), which was a complete rewrite stating
that:
The `wait_q` and `k_poll_signal` entries were removed from
`struct eventfd` as they were unnecessary.
In fact, `k_poll_signal` (both `read_sig` and `write_sig`) were used to
wake-up blocking `poll()` invocation in another thread. This is no longer
the case now, i.e. `poll(..., POLLIN)` does not return after calling
`eventfd_write()` on the observed (polled) FD.
Fix this regression by bringing back `read_sig` and `write_sig` to very
similar state as it was before.
Fixes: e6eb0a705b ("posix: eventfd: revise locking, signaling, and
allocation")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
This fixes TMAS characteristic permissions.
The characteristic shall have no security related
permissions as per TMAP_v1.0.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
Add an input build_all test with a bunch of input driver, move the
ft5336 one out of sensors as well.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
bt_mesh_elem_find can return NULL.
This also gets rid of VLA in bt_mesh_shell_mdl_print_all.
Coverity-CID: 321075
Fixes#59522
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
If the stream is stopped or released, we did not clear the
txing_stream which is what would stop the sine from being
attempted to being sent.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The seq_num in lc3_audio_send_data was updated twice:
Once when calling get_next_seq_num and once at the end
of the function.
This increased the sequence numbers too fast, and made
TX not worker properly.
Modified to only use get_next_seq_num.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
In `gatt.c`, the function `bt_gatt_ccc_cfg_conn_lookup()` was not
checking that `conn` was not NULL. That leaded to a NULL pointer
dereferences later in `bt_conn_is_peer_addr_le`.
Fix by checking that `conn` is not NULL.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
When CONFIG_PM_DEVICE is enabled IPC Device may be during power transition
during a call to intel_adsp_ipc_send_message function.
Changed signatures of intel_adsp_ipc_send_message and its sync version
to return int and negative error codes on error.
On attempt to send IPC message during Device power transition
-ESHUTDOWN error code is returned, on busy state -EBUSY.
Updated all function references.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
When option CONFIG_PM_DEVICE is enabled, IPC driver is capable
of entering D3 power state described as PM_DEVICE_ACTION_SUSPEND
(and leaving that state - powering back to PM_DEVICE_ACTION_ACTIVE).
New power control callbacks 'ipc_power_control_api' are introduced for
use during power state transisions. They allow Zephyr application
specific code to be executed.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>