Similar to how it's done for other driver classes, create a new doxygen
group to put all device-specific ADC API extensions under.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
1. Enable MCXA/MCXN platforms' LPCMP clock control through
the clock driver (syscon).
2. Enable MCXE platform's LPCMP clock control through the
clock driver (mc_cgm).
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Similar to how it's done for other driver classes, create a new doxygen
group to put all device-specific Disk Access extensions under.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add new configuration item color_coding in the structure
mipi_dbi_config and in mipi-dbi-device binding property.
The color coding is defined by MIPI Alliance Standard for
Display Bus Interface v2.0, which is required by some display
controllers and device.
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
Some diagrams on the file dt-bindings/mipi_dbi/mpi_dbi.h
doesn't deploy the correponsing pulse signal, many of them
the rising flag looks moved some spaces before or after
the rising/falling time. This is fixed by replacing
tasb with spaces
Signed-off-by: Nicolas Moreno <niko722795@gmail.com>
Add the `disk_access_erase` command to complement the read and write
commands.
As a backwards compatible new feature, this increments the API version
from `1.0.0` to `1.1.0`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The initial implementation had a flaw in it: when an active sector was
almost full, the naïve calculation could easily underflow and return a
negative value, which would be misinterpreted as an errno.
Rewrite this API to satisfy the following, reasonable expectations:
* Always return a non-negative value, provided ZMS is initialized.
* Always return 0 if no more data can be written into the sector
without triggering garbage collection.
* Never return a value less than the actual number of bytes that can
still be written into the sector.
This requires awareness of a few special cases in ZMS. These are now
captured in a helper function, which will be reused later.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Adds doxygen documentation for the extended API of the Solomon SSD16XX
EPD display controller driver.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Similar to how it's done for other driver classes, create a new doxygen
group to put all device-specific Display API extensions under.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add retry counter for opening and closing CMUX as well as
opening and closing the DLCI channel.
Use same retry counter for both DLCI control messages as well as CMUX
control messages as there is very minimal room for race condition.
DLCI messages are only send when CMUX control channel is open.
Where relevant, use disconnect(cmux) for all closing calls.
So we have one entry point for cleaning.
Similarly refactor modem_cmux_on_dlci_frame_dm() to dlci_close() as
this is the single function to close and clean up a channel.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Add a parameter to MQTT TLS configuration that allows to force native
TLS on a socket if offload dispatcher is used. This allows for MQTT to
use native TLS implementation with an offloaded TCP socket.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Adds a warning to `bt_l2cap_chan_send` that the user must not pass
buffers to this function whose pool has implemented a destroy callback
(net_buf_pool::destroy) that uses synchronization primitives. This is
due to the HCI driver interface not having defined rules for where a
buffer may be freed, leading to the possibility of the callback
being called from the ISR. This warning can be removed at a later point
if the HCI driver interface is redesigned to not pass the net_bufs
directly.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
The pio_rpi_pico_get_pio function was defined as 'inline' in the
header file. This caused 'undefined reference' linker errors when
building with CONFIG_NO_OPTIMIZATIONS=y (-O0), as the compiler
doesn't inline the function and no external symbol is provided.
This patch changes the definition to 'static inline' to ensure a
local copy is generated in each translation unit when not inlined,
consistent with other helper functions in Zephyr and the Linux kernel.
Fixes#101155
Signed-off-by: Vincent Liao <vincent932693@gmail.com>
Add implementations for the following SBC codec parameter getter functions:
bt_a2dp_sbc_get_channel_mode(): returns the channel mode (mono, dual,
stereo, joint stereo); bt_a2dp_sbc_get_subband_num(): returns the number of
subbands (4 or 8); bt_a2dp_sbc_get_block_length(): returns the block length
(4, 8, 12, or 16); bt_a2dp_sbc_get_allocation_method(): returns the
allocation method (SNR or loudness).
These functions parse the SBC codec configuration parameters and return
the corresponding values, completing the API defined in a2dp_codec_sbc.h.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
The documentation is generally using 'inst' consistently to refer to
instance numbers, but a few helper macros have gone their own way.
Clean this up to restore consistency.
This addresses changes introduced somewhere around the following
commits:
- 4c8ed7dd9a ("devicetree.h: Rework
DT_ANY_INST_HAS_PROP_STATUS_OKAY")
- ca6645d508 ("devicetree: shorten DT_ANY_INST_HAS_*_STATUS_OKAY")
- 75ab4d5507 ("devicetree: add DT_ALL_INST_HAS_PROP_STATUS_OKAY()
macro")
- 35a8e37ac2 ("devicetree: add DT_ALL_INST_HAS_BOOL_STATUS_OKAY()
macro")
Signed-off-by: Martí Bolívar <mbolivar@amperecomputing.com>
CONFIG_WARN_DEPRECATED is 'y' by default.
When a user actively disables CONFIG_WARN_DEPRECATED, one would expect
that they would stop getting all deprecation warnings, not just the
ones from kconfig.
Otherwise users continue getting tons of these warnings when building
deprecated functionality.
So let's indeed disable them also for symbols and macros.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add the functionality that allows to register write and erase callbacks.
The callbacks can modify the behaviour of this operations.
It are meant to be used during testing of the situation when the memory
starts to generate errors or the data cannot be trusted anymore.
It expands the testing possibility, for a situation when the module
is tested that checks the data integrity and and we cannot just jump in
between its internal write and read operations to inject an error.
Signed-off-by: Radosław Koppel <r.koppel@k-el.com>
TOOLCHAIN_WARNING_UNALIGNED_ACCESS can be used to
suppress false-positive warnings generated
by llvm clang compiler caused by -Wunaligned-access option
Signed-off-by: Ivan Iushkov <ivan.iushkov@nordicsemi.no>
For some controllers, such as NXP IW612 Chipset, the PCM pins of
controller needs to be configured before the SCO connection is
established. And it requires to get the `air_coding_format` to
configure the PCM pins of controller.
So, it requires to known when the SCO connection will be established
and what the `air_coding_format` of the SCO connection.
Add the function `bt_sco_hci_cb_register()` to monitor the HCI
commands `setup_sco` and `accept_sco_req`.
Add the function `bt_sco_hci_cb_unregister()` to remove the monitor.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The DNS-based Service Discovery has the following abstract:
This document specifies how DNS resource records are named and
structured to facilitate service discovery. Given a type of service
that a client is looking for, and a domain in which the client is
looking for that service, this mechanism allows clients to discover
a list of named instances of that desired service, using standard
DNS queries. This mechanism is referred to as DNS-based Service
Discovery, or DNS-SD.
As is stated here, DNS-based service discovery is designed to find all
instances implementing a service, not just the first one.
Currently, zephyr `dns_resolve_service` will call the callback for only
the first client instance found. It still does receive the responses
from other instances, but those are dropped since the query is already
marked as finished. The seems incorrect behavior.
With that said, the changes in this commit are API breaking, since even
the docs already state that only the first response is currently used.
So I am fine with creating a new function for discovering all instances
if that is more acceptable.
Since DNS-SD queries expect multiple responses, timeout or manual
cancellation are the only methods to stop an in-flight request. When a
timeout happens, the callback is called with one of the following
responses:
- `DNS_EAI_ALLDONE`: If at least one successful response was received.
- `DNS_EAI_CANCELED`: If no successful response was received.
Tested with 3 BeagleConnect Freedoms (2 running mdns_responder and 1
running dns_resolve sample).
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
In d45cd6716b the mayority of the
Zephyr codebased was changed to use the Zephyr native net_ prefixed
types, but some were forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In d45cd6716b the mayority of the
Zephyr codebased was changed to use the Zephyr native net_ prefixed
types, but some were forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add devicetree bindings for the FocalTech FT9001 SoC:
- Clock controller
- Reset controller
- UART
These bindings are required by the SoC and drivers added in subsequent
commits. Headers are placed under include/zephyr/dt-bindings/.
Signed-off-by: Robert Cheng <robert.cheng@focaltech-electronics.com>
Accurately applying clock skew correction in
`timeutil_sync_ref_from_local` and `timeutil_sync_local_from_ref`
requires double-precision floating point operations. If this is the only
usage of double precision logic in the build, but clocks skews are not
used, this can be a significant ROM overhead. Disabling this option can
save ~2.4 kB of ROM.
Signed-off-by: Jordan Yates <jordan@embeint.com>
PINT connects GPIO pin to seperate IRQ slot. This info is
hidden in PINT driver, there is no way to know which IRQ
actually the GPIO pin is connected to.
Add new API to get which IRQ slot is connected to, based on
pin index.
Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
Remove duplicated #include directives within the same
preprocessor scope across the Zephyr tree.
Duplicates inside different #ifdef branches are preserved
as they may be intentional.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
ext and loader aren't modified inside llext_get_section_header(),
they are just passed to llext_section_shndx(), where they're already
const. Make them const in this function too.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
- CONFIG_ARM_MPU_SRAM_WRITE_THROUGH: enables Write-Through cache policy
for SRAM regions instead of default Write-Back
Includes corresponding MPU attribute macros for ARMv7-M and ARMv8-M
architectures. Maintains backward compatibility with existing
configurations.
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
Some macros defined for SDRAM timing configuration have typo.
This commit fixes the mistake and updates the macro used
in the code.
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
- Update the driver to support the kit_pse84_eval board
- Update to new peripheral clock allocation scheme
Signed-off-by: McAtee Maxwell <maxwell.mcatee@infineon.com>
When calculating the PLL output rate, take into account the fractional part
of the PLL multiplier N. This ensures that the calculated output frequency
is correct.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Add a simple function that exposes the airtime of a packet of a given
length.
Use the new internal implementations of the airtime function when
calculating TX durations inside the send functions to reduce code
duplication on a complex function.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Updates the `bt_le_oob_set_legacy_tk` API docs to encourage the temp key
to be generated randomly for each pairing process.
Updates the `bt_le_oob_get_local` and `bt_le_ext_adv_oob_get_local` to
encourage the user to generate new OOB information for each paring
process.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Implement arch_zli_lock and arch_zli_unlock for the currently only
supported target cortex-M.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Introduce APIs for locking zero latency interrupts.
Zero latency interrupts are defined as non-maskable interrupts
"above" the kernel. They can not be locked by the kernel.
However, there are cases where we do need to mask/lock ZLIs from the
kernel, namely when accessing and changing the state of core shared
hardware like RAM and the CPU which must be done atomically.
A common case is when powering down or rebooting the SoC. We can't
allow any IRQ, ZLI or not, to interrupt these operations. In any case,
such an interrupt would be immediately followed by the CPU being off,
and whatever process running from ZLIs would be terminated anyway.
Since we have specific usecases which require these APIs, and there
are already drivers and socs which do lock ZLIs by directly calling
arch APIs to acheive this, let's officially add the APIs with
appropriate documentation detailing expected usecases and warning of
the dire consequences of misusing it, keeping it in arch/cpu.h to
limit exposure of the API (compared to having it in zephyr/irq.h).
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>