summaryrefslogtreecommitdiff
path: root/chip/stm32/gpio-stm32f.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/stm32/gpio-stm32f.c')
-rw-r--r--chip/stm32/gpio-stm32f.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/chip/stm32/gpio-stm32f.c b/chip/stm32/gpio-stm32f.c
index 450169f3f8..f917d00a0d 100644
--- a/chip/stm32/gpio-stm32f.c
+++ b/chip/stm32/gpio-stm32f.c
@@ -111,7 +111,7 @@ void gpio_set_flags_by_mask(uint32_t port, uint32_t pmask, uint32_t flags)
/* Interrupt is enabled by gpio_enable_interrupt() */
}
-void gpio_set_alternate_function(int port, int mask, int func)
+void gpio_set_alternate_function(uint32_t port, uint32_t mask, int func)
{
/* TODO(rspangler): implement me! */
}
@@ -224,11 +224,10 @@ static void gpio_interrupt(void)
STM32_EXTI_PR = pending;
while (pending) {
- bit = 31 - __builtin_clz(pending);
+ bit = get_next_bit(&pending);
g = exti_events[bit];
if (g && g->irq_handler)
g->irq_handler(g - gpio_list);
- pending &= ~(1 << bit);
}
}
DECLARE_IRQ(STM32_IRQ_EXTI0, gpio_interrupt, 1);