Add boolean_strict_init.cocci to detect improper boolean initialization
and assignment using integer literals (0/1) instead of true/false.
This enforces Zephyr coding guideline #59 (MISRA C:2012 Rule 10.1)
which states that operands shall not be of an inappropriate essential
type.
Rules added:
- rule1_init: detects bool var = 0/1 initialization
- rule2_assign: detects bool_var = 0/1 assignment
The original boolean.cocci (Rule 14.4) remains disabled due to
performance issues on large files causing CI timeouts. See PR #34773.
Enable boolean_strict_init.cocci in guideline_check.py so CI runs this
check on changed files.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
add overlay file to configure external flash to run sample
in octal mode with dual rate transfer.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
PR #94869 now handles the DMA offset internally within the driver.
Therefore, the dma_stream channel is no longer increment by
STM32_DMA_STREAM_OFFSET(1) in the flash_stm32_ospi driver.
Additionally update in stm32l562e_dk dts the OSPI mode from
OSPI_OPI_MODE to OSPI_SPI_MODE to enable the sample to run
succesfully.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
The gpio_pca_series driver may stop responding if the gpio_int is
asserted between reading the interrupt status and clearing it.
If the interrupt gpio_int is not deasserted by the time the handler
finishes, the interrupt work should be rescheduled.
Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
The DTS spec makes it clear that `devtce_type` can only be set to
'memory'. See Table 3.3
The DTS spec make it clear that property name is depricated 2.3.12 and
Given that the `name` property value matches the node name, this
property can be removed.
Signed-off-by: Kyle Bonnici <kylebonnici@hotmail.com>
New binding added for the hfxo to define a startup-time-us.
Placeholder used based on fixed wait time and chirpTime,
xtallSettleTime, biasSearch defined in the IP.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
Binding for nrf71 HFXO support where startup-time-us prop
defaults, which will be replaced with optimal values at board level
in the future, as they depend on the specific crystal in use.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
When this test is built with CONFIG_NO_OPTIMIZATIONS (which is the case
when building with CONFIG_COVERAGE) or when building with debug logging,
it fails to link due to lacking bt_uuid_str().
Let's include the corresponding file so it can link.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
When building without optimizations (which is the case when building
with CONFIG_COVERAGE also), the compiler warns that 2 test variables
may be used un-initialized. Let's just set them to 0.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
When building with CONFIG_NO_OPTIMIZATIONS the compiler will not
optimize create_answer() based on the caller, and will try to call
ipv4/6 code even if not built.
Let's add an extra check in the if before those possibly unavailable
calls to ensure those branches are dropped in this case.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit adds support to handle the case when `otPlatUdpConnect` is
called with either ip address set to any, or port set to 0.
In this case, sa_family is set to `NET_AF_UNSPEC` as per POSIX spec, to
reset socket's peer address.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
This commits refactors the mDNS socket by:
- splitting the send functions to IPV6 and IPV4 related ones;
- fixing some variable naming convention and minor identation issues
No new functionality is added, this was done to ease code
readability.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Disable rng node and use PSA API as entropy driver when TF-M is embedded
since it owns the SoC RNG interface.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Disable rng node and use PSA API as entropy driver when TF-M is embedded
since it owns the SoC RNG interface.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Disable rng node and use PSA API as entropy driver when TF-M is embedded
since it owns the SoC RNG interface.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Disable rng node and use PSA API as entropy driver when TF-M is embedded
since it owns the SoC RNG interface.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Disable rng node and use PSA API as entropy driver when TF-M is embedded
since it owns the SoC RNG interface.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
This change makes the driver rely on DT_INST_FOREACH_STATUS_OKAY(...)
rather than copy-paste the same code several time.
This also has the advantage of allowing more that 5 instances of this
uart driver.
Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
Drop `counter_stm32_reset_timer`, introduced in PR #94189 (01a00d5),
as it duplicates the existing `counter_stm32_reset` functionality.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Calling net_if_set_link_addr() is needed to update the link address
information of the interface.
Signed-off-by: Jeremy Truttmann <jetstreeam.code@outlook.com>
Extend the Wi-Fi shell connect command to allow passing an SAE
password separately from PSK. Previously, the shell stored all
passwords in the PSK field, preventing proper use of SAE credentials
required for WPA3 connections.
This change adds a dedicated option to populate the SAE password
field so that SAE authentication paths can be exercised correctly
from the shell.
Signed-off-by: Somil Gupta <somil24559@iiitd.ac.in>
Add explicit clock configuration and enable calls during driver
initialization.
Note: -ENOSYS is temporarily ignored as not all clock control
drivers currently implement the configure API. This handling
should be removed once all clock drivers support configure.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
Add explicit clock configuration and enable calls during driver
initialization.
Note: -ENOSYS is temporarily ignored as not all clock control
drivers currently implement the configure API. This handling
should be removed once all clock drivers support configure.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
Change LEDC channel 0 pinmux from GPIO2 to GPIO8 to match
the onboard LED location on the ESP32-C3 SuperMini board.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Fix incorrect diff calculation for relative alarms that caused alarm
callbacks to never fire. The original code calculated diff as
(alarm_cfg->ticks - now), which caused unsigned underflow when
now > alarm_cfg->ticks, resulting in a huge diff value that
incorrectly triggered the late alarm path and set callback to NULL.
For relative alarms, the diff should simply be the ticks value since
it already represents the delay from the current time.
Also add channel validation to return -ENOTSUP for chan_id > 0 since
ESP32 timer hardware only supports one alarm comparator per timer.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Added mikrobus_serial, mikrobus_i2c, mikrobus_spi and mikrobus_header
node labels to EK-RA2L1 device tree board definition, allowing
compatible shield boards to be used.
Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
Remove the negative value check on bss_max_idle_period, which is
defined as an unsigned type and can never be less than zero.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Refactor scan_done_handler to retrieve Access Point (AP) records one
by one rather than pre-allocating a large buffer for the entire list.
Previously, the driver attempted to k_malloc space for all detected APs
simultaneously. In environments with high AP density or under system
memory pressure, this allocation would often fail, resulting in no
scan results being reported.
Improvements:
- Switched to stack-allocated wifi_ap_record_t to process entries.
- Replaced esp_wifi_scan_get_ap_records with a while-loop using
esp_wifi_scan_get_ap_record to reduce peak heap usage.
- Added esp_wifi_clear_ap_list() to ensure hardware resources are
freed after the loop completes.
- Added warning log on unexpected scan fetch failures.
This makes Wi-Fi scanning significantly more robust in memory-constrained
scenarios.
Signed-off-by: Madhab Sharma <madhabsharma94@gmail.com>
Fix the logic in `uart_xec_irq_tx_complete` when evaluating the UART line
status register against the TX-empty mask. The previous condition could
report "TX complete" even when the TX path was not fully empty, which can
cause flush users to loop or make incorrect progress decisions.
This change corrects the comparison against the TX-empty mask so that the
function only reports completion when the hardware indicates the expected
empty state.
Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
Adds iia as collaborator who contributed the K32L SOC support and
frdm_k32l2b3 board so they can help maintain this platform support.
Signed-off-by: Derek Snell <derek.snell@nxp.com>
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
initialized and used with proper essential type (true/false).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
initialized and used with proper essential type (true/false).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
initialized and used with proper essential type (true/false).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
initialized and used with proper essential type (true/false).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
initialized with true/false, not 1/0.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
initialized with true/false, not 1/0.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
initialized with true/false, not 1/0.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
initialized with true/false, not 1/0.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Fix incorrect register base mapping in nxp_mcxaxx6_common.dtsi where
lpuart1 was erroneously mapped to the lpi2c0 base address (0x4009a000).
Correct the lpuart1 register base to 0x400a0000 to match the MCX A-series
reference manual.
The incorrect mapping caused duplicate unit-address warnings between
lpuart and i2c nodes and could lead to invalid register access and early
HardFault when lpuart1 is enabled.
The issue was not detected on reference boards as lpuart1 is not used
there
Signed-off-by: Siegurt Skoda <skoda@ph2.uni-koeln.de>
Adds these properties which are missing, and fixes instances of
wrongly using relative addresses when they are already absolute
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>