-
-
Notifications
You must be signed in to change notification settings - Fork 212
/
Copy path0076-gpio_irq_enable-event-fix.patch
29 lines (26 loc) · 1.2 KB
/
0076-gpio_irq_enable-event-fix.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 292b84ea7536d44b1a25b346da189a25c0b5317b Mon Sep 17 00:00:00 2001
From: pennam <m.pennasilico@arduino.cc>
Date: Tue, 9 Mar 2021 17:51:51 +0100
Subject: [PATCH 10/16] gpio_irq_enable event fix
---
.../TARGET_PORTENTA_H7/COMPONENT_WHD/interface/cyhal_gpio.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_PORTENTA_H7/COMPONENT_WHD/interface/cyhal_gpio.cpp b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_PORTENTA_H7/COMPONENT_WHD/interface/cyhal_gpio.cpp
index a0fa5ffbc3..0bc9fd482c 100644
--- a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_PORTENTA_H7/COMPONENT_WHD/interface/cyhal_gpio.cpp
+++ b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_PORTENTA_H7/COMPONENT_WHD/interface/cyhal_gpio.cpp
@@ -47,10 +47,10 @@ void cyhal_gpio_irq_enable(cyhal_gpio_t pin, cyhal_gpio_irq_event_t event, bool
{
oob_event = event;
if (enable) {
- if (CYHAL_GPIO_IRQ_RISE) {
+ if (event == CYHAL_GPIO_IRQ_RISE) {
oob_irq->rise(cb);
}
- if (CYHAL_GPIO_IRQ_FALL) {
+ if (event == CYHAL_GPIO_IRQ_FALL) {
oob_irq->fall(cb);
}
} else if (oob_irq != NULL) {
--
2.30.2