Skip to content
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

cpu/qn908x: Fix triggering GPIO IRQ. #15568

Merged
merged 1 commit into from
Dec 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions cpu/qn908x/periph/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
}
Expand Down