aboutsummaryrefslogtreecommitdiff
path: root/lib/stm32/common/gpio_common_f24.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stm32/common/gpio_common_f24.c')
-rw-r--r--lib/stm32/common/gpio_common_f24.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/stm32/common/gpio_common_f24.c b/lib/stm32/common/gpio_common_f24.c
index d464a50..5b29693 100644
--- a/lib/stm32/common/gpio_common_f24.c
+++ b/lib/stm32/common/gpio_common_f24.c
@@ -184,7 +184,7 @@ void gpio_set_af(u32 gpioport, u8 alt_func_num, u16 gpios)
for (i = 8; i < 16; i++) {
if (!((1 << i) & gpios))
continue;
- afrl &= ~GPIO_AFR_MASK(i - 8);
+ afrh &= ~GPIO_AFR_MASK(i - 8);
afrh |= GPIO_AFR(i - 8, alt_func_num);
}