mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-25 06:23:53 +01:00
cpu/stm32/gpio_f1: fix IRQ handler
This commit is contained in:
parent
3571db64e6
commit
80360e5308
@ -242,12 +242,15 @@ void gpio_irq_disable(gpio_t pin)
|
||||
|
||||
void isr_exti(void)
|
||||
{
|
||||
/* only generate interrupts against lines which have their IMR set */
|
||||
uint32_t pending_isr = (EXTI->PR & EXTI->IMR & GPIO_ISR_CHAN_MASK);
|
||||
/* read all pending interrupts wired to isr_exti */
|
||||
uint32_t pending_isr = (EXTI->PR & GPIO_ISR_CHAN_MASK);
|
||||
|
||||
/* clear by writing a 1 */
|
||||
EXTI->PR = pending_isr;
|
||||
|
||||
/* only generate soft interrupts against lines which have their IMR set */
|
||||
pending_isr &= EXTI->IMR;
|
||||
|
||||
/* iterate over all set bits */
|
||||
uint8_t pin = 0;
|
||||
while (pending_isr) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user