Skip to content

Commit

Permalink
fixup! cpu/sam0_common: implement periph_gpio_ll_irq
Browse files Browse the repository at this point in the history
  • Loading branch information
maribu committed Jan 22, 2024
1 parent 2d60a33 commit c94780a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cpu/sam0_common/periph/gpio_ll_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,11 @@ void gpio_ll_irq_unmask_and_clear(gpio_port_t port, uint8_t pin)
int exti_num = get_exti_num(port_num, pin);
assume(exti_num >= 0);

EIC_SEC->INTENSET.reg = 1U << exti_num;
EIC_SEC->INTFLAG.reg = 1U << exti_num;
unsigned irq_state = irq_disable();
uint32_t mask = 1U << exti_num;
EIC_SEC->INTFLAG.reg = mask;
EIC_SEC->INTENSET.reg = mask;
irq_restore(irq_state);
}

int gpio_ll_irq(gpio_port_t port, uint8_t pin, gpio_irq_trig_t trig,
Expand Down

0 comments on commit c94780a

Please sign in to comment.