summaryrefslogtreecommitdiff
path: root/chip/stm32/gpio-stm32f0.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/stm32/gpio-stm32f0.c')
-rw-r--r--chip/stm32/gpio-stm32f0.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/chip/stm32/gpio-stm32f0.c b/chip/stm32/gpio-stm32f0.c
index 6933697c46..8e756ab183 100644
--- a/chip/stm32/gpio-stm32f0.c
+++ b/chip/stm32/gpio-stm32f0.c
@@ -67,6 +67,10 @@ void gpio_set_flags_by_mask(uint32_t port, uint32_t mask, uint32_t flags)
val |= 0x55555555 & mask2;
STM32_GPIO_MODER(port) = val;
+ } else if (flags & GPIO_ANALOG) {
+ /* Analog, MODE=11 */
+ val |= 0xFFFFFFFF & mask2;
+ STM32_GPIO_MODER(port) = val;
} else if (flags & GPIO_INPUT) {
/* Input, MODE=00 */
STM32_GPIO_MODER(port) = val;