In hal_stm32 commit "update stm32h7rs to cube version V1.2.0"
e5eba65b76
the constants FLASH_OPTKEY1/2 for the STM32H7RS have been renamed to
FLASH_OPT_KEY1/2. For backward compatibility, 2 defines have been added
to Legacy/stm32_hal_legacy.h, so that FLASH_OPTKEYx is an alias for
FLASH_OPT_KEYx.
However, in Zephyr's STM32 flash driver, the alias is defined the other
way around since 5dc537389a, which leads to
Twister build failures, for example
https://github.com/zephyrproject-rtos/zephyr/actions/runs/14927867714/job/41936931524#step:12:1335
To fix the build issue, we can simply remove that alias in Zephyr, since
it is no longer needed.
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Move backlight i2c controller address into DTS configuration
to be able to use jhd1313 driver for dfrobot's LCD1602.
Signed-off-by: Leon Mariotto <leon2mariotto@gmail.com>
The blend mode was set in a way that multiplied pixels with the alpha
value during read, which caused tests to fail.
Signed-off-by: Martin Stumpf <finomnis@gmail.com>
Don't use the same name for the structure instance and type.
As that is a violation of MISRA-C 2012 rule 5.7.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Don't use the same name for the structure instance and type.
As that is a violation of MISRA-C 2012 rule 5.7.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix undeclared variable error by changing 'config' to 'cfg' in the
data_sync condition check, matching the variable name declared at the
beginning of the function.
Signed-off-by: Liang Jiaxiang <moonbite233@gmail.com>
This commit introduces a new driver for a common GPIO-driven 7-segment
display. supporting both common anode and common cathode configurations.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
Terminate "if ... else if ..." constructs with an empty "else" clause to
indicate that consideration has been given regarding the behaviour when all
other conditions evaluate to false.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This change adds additional workaround for following errata:
"USART does not generate DMA requests after setting/clearing DMAT bit"
Instead of keepint DMAT bit set, it sends first byte by polling
in firmware. This prevents additional power consumption in STOP mode,
caused by keeping DMAT bit set.
Signed-off-by: Adam Berlinger <adam.berlinger@st.com>
The buffer_length != 0 is used to check if there is transfer ongoing
inside the uart_stm32_async_tx function. uart_stm32_dma_tx_cb clears
it to 0 when TX DMA is finished, but before the USART send all
the data from shift register.
buffer_length is also cleared in callback async_evt_tx_done,
which is called when USART finished sending all the bytes.
If the uart_stm32_async_tx would be called after
uart_stm32_async_tx, but before async_evt_tx_done there
could be race condition on buffer_length.
Signed-off-by: Adam BERLINGER <adam.berlinger@st.com>
Add CAN driver support for Renesas RZ/G3S
Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
The LED_STRIP driver is not enabled by default on all boards. As a result,
building the LED_STRIP_MATRIX display driver fails if LED_STRIP is not
manually enabled.
To address this, this commit changes the dependency from `depends on` to
`select`, ensuring that the required driver is automatically enabled and
build failures are avoided.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
On nrf54h20 there are additional analog pins (AIN8+). When differential
mode is used they must not be mixed with AIN0-AIN7. Add build time
validation which detects if configuration is invalid.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The nRF GPIO hardware does not store the initial output value
set resulting from gpio_pin_configure() and thus, when
gpio_get_config() is used, the initial value is not returned.
This commit just reads the output value and sets the INIT
value to match in gpio_get_config().
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Since https://github.com/zephyrproject-rtos/zephyr/pull/83114 was merged,
I get twister errors unrelated to my pull requests for the STM32H7S78-DK
(for example https://github.com/zephyrproject-rtos/zephyr/actions/runs/14900504138/job/41851537049#step:12:1369)
This is because the function LL_GetFlashSize() was removed from hal_stm32
on the STM32H7RS series in
e5eba65b76
I am unsure if the removal from hal_stm32 is intentional. If yes, then this
commit should be merged into Zephyr to fix compilation for that target.
Otherwise, hal_stm32 must be patched, Zephyr's west manifest updated, and
this commit can be discarded.
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Mass renaming is carried out to unify some prefixes and shorten some
macros, making the code easier to maintain and support new devices.
- Rename `int_dev` to `gpio_int_dev` for gpio interrupt
- Rename `eirq` to `ext_irq` for external interrupt
- Rename `gpio_rz_hw_config` to `gpio_rz_flags`
- Rename `p_pm` to `gpio_flags`
- Rename `pre_flags` to `rz_flags`
- Remove `_IOPORT` and `_PIN_CONFIGURE` in some macros
- Rename `GPIO_RZ_PIN_CONFIGURE_GET_FILTER`,
`GPIO_RZ_PIN_CONFIGURE_GET`, `GPIO_RZ_PIN_SPECIAL_FLAG_GET` to
`GPIO_RZ_FLAG_GET_FILTER`, `GPIO_RZ_FLAG_GET_CONFIG`,
`GPIO_RZ_FLAG_GET_SPECIFIC` respectively
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
This driver doesn't need to do anything in its irq_update
implementation, but add a dummy one so that calls to uart_irq_update
don't fail with -ENOSYS.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
This driver previously caused an assertion error if non-NULL user_data
was passed to uart_irq_callback_set. Add support for this by storing the
user data and passing it back to the IRQ callback function.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
The flash latency needs to be configured before switching to the high
speed clock. Set the latency based on the CH32V003 and CH32V00x
reference manual.
Signed-off-by: Michael Hope <michaelh@juju.nz>
Expand the current systick compatibility to include the CH32V00x
series. Change the HAL compatibility to include all of the CH32V
family.
Signed-off-by: Michael Hope <michaelh@juju.nz>
The CH32V006 and others in the CH32V00x series are an evolution of the
CH32V003 and use different remap offsets for the various peripherals.
In the same way as the CH32V20x, fork the CH32V003 driver and add
CH32V00x support.
Signed-off-by: Michael Hope <michaelh@juju.nz>
This commit adds a padding of 0x10 bytes at the beginning of the
`gpio_davinci_regs` structure to correctly align the register
definitions with the actual register layout.
Previously, the DTS had to manually offset the base address by
0x10, introducing a special case in Zephyr's Davinci GPIO driver.
This change eliminates the need for that workaround
Adding the paddingi also help to maintain a similarly with also
to the linux counterpart.
Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com>
1. rework IOM cmdq buffer instantiation
2. rework spi and i2c cache handling as it is incorrect.
3. buffers need to be aligned with DCACHE on
Signed-off-by: Swift Tian <swift.tian@ambiq.com>
The previous implementation already reported a key-press event after
reading an ADC value close to the threshold for the first time.
This may lead to false events if the ADC takes a reading just during
the transition from one button state to another (especially if a
somewhat large capacitor is used to avoid noise).
A key-press state must be same for at least two samples in order to
avoid such issues, which is what this commit implements.
Signed-off-by: Martin Jäger <martin@libre.solar>
The Microchip CAP12xx series has a configurable sensitivity and
can drive an optional guard signal to reduce noise sensitivity.
Signed-off-by: Jeremy Dick <jdick@pivotint.com>
To improve code clarity, use `shell_print` in place of `shell_fprintf`
with `SHELL_NORMAL` where appropriate.
For partial-line outputs, use `shell_fprintf_normal` to preserve output
formatting.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Make `sensor_channel_name` and `sensor_attribute_name arrays` to use
`const char *const`. This ensures full immutability of the tables,
placing them entirely in the `.rodata` section and reducing usage
of the `.data` segment.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Aligned the `struct shell *` argument name from `shell_ptr` to `sh`
for consistency with other drivers' usage of `sh`, and to match
the `shell_cmd_handler` argument name.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Aligned the `struct shell *` argument name from `shell_ptr` to `sh`
for consistency with other drivers' usage of `sh`, and to match
the `shell_cmd_handler` argument name.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
The PWDWN_CTLx have been adjusted to support for NPCK chips. This
commit updates powe-down control initialization for NPCXN and NPCKN chips.
Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
Add support for using the diag0 pin as an interrupt source. This
allows event detection via diag0 interrupts instead of polling rampstat.
The driver now:
- Configures diag0 when the GPIO is available
- Sets up GPIO interrupt handling for rising edge transitions for
rampstat reading
- Falls back to polling only when diag0 is not available
Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
Simplified by removing redundant options and
enabled automatic fallback to ramp status polling when
diag0 pin is unavailable for event detection.
Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
This fixes several ways to hang the driver, such as:
- typing too fast
- going over the read buffer capacity
- pasting anything
- using arrow keys (sending 2 chars at once)
etc
Signed-off-by: Camille BAUD <mail@massdriver.space>