Skip to content

Dev #10231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Dev #10231

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions bsp/Infineon/libraries/HAL_Drivers/drv_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Change Logs:
* Date Author Notes
* 2022-07-1 Rbb666 first version
* 2025-04-24 Passionate0424 fix ifx_pin_irq_enable
*/

#include "drv_gpio.h"
Expand Down Expand Up @@ -320,7 +321,7 @@ static rt_err_t ifx_pin_irq_enable(struct rt_device *device, rt_base_t pin,
irqmap = &pin_irq_map[gpio_port];

#if !defined(COMPONENT_CAT1C)
IRQn_Type irqn = (IRQn_Type)(irqmap->irqno + PORT_GET(irqmap->port));
IRQn_Type irqn = irqmap->irqno;
irq_cb_data[irqn].callback = irq_callback;
irq_cb_data[irqn].callback_arg = (rt_uint16_t *)&pin_irq_map[gpio_port].port;
cyhal_gpio_register_callback(gpio_pin, &irq_cb_data[irqn]);
Expand Down Expand Up @@ -353,10 +354,10 @@ static rt_err_t ifx_pin_irq_enable(struct rt_device *device, rt_base_t pin,
{
level = rt_hw_interrupt_disable();

Cy_GPIO_Port_Deinit(CYHAL_GET_PORTADDR(gpio_pin));
irqmap = &pin_irq_map[gpio_port];

#if !defined(COMPONENT_CAT1C)
IRQn_Type irqn = (IRQn_Type)(irqmap->irqno + PORT_GET(irqmap->port));
IRQn_Type irqn = irqmap->irqno;
_cyhal_irq_disable(irqn);
#endif
rt_hw_interrupt_enable(level);
Expand Down