1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-27 23:41:18 +01:00

Merge pull request #15568 from iosabi/qn908x_gpio_int

cpu/qn908x: Fix triggering GPIO IRQ.
This commit is contained in:
benpicco 2020-12-06 19:38:24 +01:00 committed by GitHub
commit 0fcecdeaca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,6 +117,9 @@ typedef struct {
*/
#define TOTAL_GPIO_PINS (35)
/* The IRQ number in the NVIC for each GPIO port. */
static const uint32_t gpio_nvic_irqs[GPIO_PORTS_NUMOF] = GPIO_IRQS;
static gpio_isr_cb_state_t gpio_isr_state[TOTAL_GPIO_PINS] = {};
int gpio_init_int(gpio_t pin, gpio_mode_t mode, gpio_flank_t flank,
@ -162,6 +165,7 @@ int gpio_init_int(gpio_t pin, gpio_mode_t mode, gpio_flank_t flank,
/* Handled above */
break;
}
NVIC_EnableIRQ(gpio_nvic_irqs[GPIO_T_PORT(pin)]);
gpio_irq_enable(pin);
return 0;
}