So they depend or select on the right NATIVE_BUILD
instead of NATIVE_APPLICATION.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
To differentiate builds which will produce a native executable
as direct output from the Zephyr build,
or a library which can be used later.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Overlay adds 4 timers for testing and selects various frequencies
to select high speed (DIVN) and low-speed (LP-CLK) as sources.
Different prescalers are applied for different timers to
test wider range of conditions.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
This adds support for the TIMER1-4 counter.
Each counter has 24bits and can run on LP_CLK (15-32KHz)
or DIVN clock (32MHz) with prescaler 1-32.
Each counter can have one alarm set.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
Enable automatic temperature measurements during charging.
Allows the PMIC to charge when the host is in low power mode.
Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
The vbus current limit is now written to the vbus startup
register. It is now applied at all times and does not need
to be updated on charger insertion.
Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
The documentation of net_if_dev was missing information how
it should be instantiated.
Fixes#59975
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
parse_number() helper function accepts long * pointer or the output,
however in several places, an address of a variable of incompatible
type was passed to the function (for example an address of a bool
variable was cast to (long *) and provided to the function). This
could cause memory overwrites or other unexpected behaviour.
Fix this, by defining a helper variable of type long, and use it with
the parse_number() function. Only after successful parsing, the value is
then assigned to the proper destination.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
When PMAX value is changed, it should update all events.
I believe there is a bug that caused the code only to update
events that are ongoing (to be send).
Now if PMAX changes, next event timestamp is recalculated.
Fixes#59397
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
The enum used for connection types gets named bt_conn_type to guard
against accidental usage of generic integers with relation to it.
The added default case in several switch statements avoids warnings
against unhandled enum values.
Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
Fail gracefully if an HCI event of one type arrives for a handle of a
different connection type. The requested types are currently based on
what fields are used, not on the usage context, in order to keep every
correct use so far still working.
A warning is logged if the connection identified by the handle does not
match the requested connection type.
Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
NMI_INIT() is now a no-op, so remove it from all SoC code. Also remove
the irq lock/unlock pattern as it was likely a cause of copy&paste when
NMI_INIT() was called.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Zephyr provides a default NMI handler (`z_SysNmiOnReset`), which will
basically call `wfi` endlessly. It is allowed to override such handler
when CONFIG_RUNTIME_NMI=y, via `z_arm_nmi_set_handler`. However,
enabling such option also provided `z_arm_nmi_init` (via `NMI_INIT()`),
which basically sets the handler to `DefaultHandler` (a new handler that
basically printks and reboots). This is strictly not needed, and
independent of the runtime NMI option. As a result, most SoCs were
blindly calling `NMI_INIT()`, probably because of a copy&paste effect.
In the majority of cases, this was a no-op, but most SoCs do IRQ
enable/disable, making this even more convoluted. To make things worse,
the init call is expected to run after console has been initialized (for
printk to work?), but most SoCs just called it in PRE_KERNEL_1+0.
This patch just drops this NMI initializer API, and leaves only the
handler set call when CONFIG_RUNTIME_NMI=y.
NMI_INIT() dummy definition is left in this patch to preserve
bisectability, will be dropped later.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The "virtio_" prefix is used by the open-amp library API.
Rename local functions using "ipc_virtio_" prefix to avoid
function redefinition.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
The "virtio_" prefix is used by the open-amp library API.
Rename local functions using "ipc_virtio_" prefix to avoid
function redefinition.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
The CDC ACM implementation provides a virtual UART interface
that is used by various samples and subsystems in a way that is
compatible with the real UART interface.
Commit cc1b2c70cc
("uart: doc: Add special case for virtual UART")
added a questionable comment to uart_fifo_fill() API
description in an attempt to fix issue described in
https://github.com/zephyrproject-rtos/zephyr/issues/11455
However, this did not fix the problem because the API is not
designed to be used in this way. Finally commit 0e57e4fb78
("samples: usb: cdc_acm: Update CDC ACM echo sample")
revised the sample to use the API in the correct way.
Remove incorrect comment in uart_fifo_fill(). For compatibility
reasons and due to the design of the API, such differences must not
exist.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Instead of waiting for ase_buf to be available, the read of an
ASE in IDLE state can be handled without using ase_buf.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This refactors the code to use exact copy of bt_gatt_attr_read instead
of mock, as the implementation might call the function with stack
allocated value. Using mock would require deep copy of the value for
further verification. As the buffer where the value is about to placed
is one of the attr->read() parameters, the test may call the read()
callback with stack allocated buffer of defined size and read the value
from the buffer.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This fixes missing control point status and ASE status change, when
failed to disconnect the CIS. As the server may, but does not have to
disconnect the CIS, the operation should not be considered as failed
when it happens.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
Because they are needed in SoC power.c, clock control init functions
for all other STM32 series has been exported as global.
This commit exports stm32_clock_control_init function as global for
STM32H7 series as well, making custom power management
implementations for STM32H7 series possible.
Signed-off-by: Tomislav Milkovic <tomislav.milkovic95@gmail.com>
Add a variation of the basic Kconfig check that runs with no modules,
catches symbols that are used in the main repository but are defined
only in modules, which are potentially problematic if a downstream
project is not using the specific module.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
These are referenced by the "x module not available" message in
modules/Kconfig, but were only defined in the module, were generating an
undefined symbol warning when running CI compliance with no modules.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
NO_CACHE cannot be selected for certain cores.
Use ARCH_HAS_NOCACHE_MEMORY_SUPPORT as the condtion
to select NO_CACHE config
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Split flash into partitions (4x256KB). There is no way to make partitions
smaller, because of block size. This feature enables to switch between
2 applications.
Signed-off-by: Andrej Valek <andy@skyrain.eu>
PR instantiates cdb and core keys to prevent scenario
when key is changed over cdb API and gets new ID but
core still operates with old ID(potentially invalid).
Known issue the keys will be desynchronized
during\after key refresh procedure.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
This commits eliminates the old way of
pacs notifications, replacing k_work with
simple bt_gatt_notify.
Signed-off-by: Szymon Czapracki <szymon.czapracki@codecoup.pl>
Fixes a minor issue with the documentation where there are
conflicting messages about the required validity of the parameters.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
The blink command should blink until the user presses a key, however on
some systems a pending keypress is present when entering the loop
causing it to immediate exit before getting a chance to blink.
Add a dummy read to clear the buffer before starting the blink loop.
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
Introduce a new area of maintenance for the IEEE 802.15.4 native stack
as distinguished from both, IEEE 802.15.4 drivers and OpenThread and
more specialized than generic network subsystem maintainership.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
When doing the bt_ots_dir_list_reset_anchor we now explicitly ignore
the return value of bt_gatt_ots_obj_manager_first_obj_get
to fix a coverity issue.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Some node items in Kconfig can be kconfiglib.MENU or kconfiglib.COMMENT.
Those are integers and thus do not contain a node.item.name field.
Handle those separately to avoid hitting the followig exception:
Traceback (most recent call last):
File "/home/runner/work/zephyr/zephyr/./scripts/ci/check_compliance.py",\
line 1307, in main
n_fails = _main(args)
File "/home/runner/work/zephyr/zephyr/./scripts/ci/check_compliance.py",\
line 1242, in _main
test.run()
File "/home/runner/work/zephyr/zephyr/./scripts/ci/check_compliance.py",\
line 277, in run
self.check_no_redefined_in_defconfig(kconf)
File "/home/runner/work/zephyr/zephyr/./scripts/ci/check_compliance.py",\
line 445, in check_no_redefined_in_defconfig
Kconfig node '{node.item.name}' found with prompt or help in\
{node.filename}.
AttributeError: 'int' object has no attribute 'name'
Seen in #58454.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Set the PWM clock prescaler values to 64 for controlling standard servo
50Hz carrier frequency.
Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
This patch sets ENET2 ref clock to be generated by External OSC
ENET2 ref clock direction as output
ENET2 ref clk frequency to 50MHz
Signed-off-by: Sumit Batra <sumit.batra@nxp.com>
used for gps and telemtry.
This patch configures the correct pinmux settings for
lpuart2, lpuart3, lpuart5 ports used for gps and telemetry modules.
It also adds software pull up for the UART console port lpuart7.
Signed-off-by: Sumit Batra <sumit.batra@nxp.com>
Co-authored-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
Co-authored-by: Iain Galloway <iaintravelgalloway@gmail.com>
Cast ticker_stop() calls to void where return value is not checked.
This is to satisfy coverity and indicate that return value is not
important.
Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>