1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 05:53:49 +01:00

Merge pull request #14711 from benpicco/cpu/sam0_common/gpio-intermediate_irq

cpu/sam0_common: GPIO: ignore stale interrupts
This commit is contained in:
benpicco 2020-08-11 16:32:57 +02:00 committed by GitHub
commit 419ee52ddc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -322,6 +322,11 @@ void gpio_irq_enable(gpio_t pin)
if (exti == -1) {
return;
}
/* clear stale interrupt */
_EIC->INTFLAG.reg = (1 << exti);
/* enable interrupt */
_EIC->INTENSET.reg = (1 << exti);
}