summaryrefslogtreecommitdiff
path: root/chip/stm32/gpio-stm32f100.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/stm32/gpio-stm32f100.c')
-rw-r--r--chip/stm32/gpio-stm32f100.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/chip/stm32/gpio-stm32f100.c b/chip/stm32/gpio-stm32f100.c
index dd729eab82..8c071394e4 100644
--- a/chip/stm32/gpio-stm32f100.c
+++ b/chip/stm32/gpio-stm32f100.c
@@ -73,11 +73,11 @@ int gpio_set_flags(enum gpio_signal signal, int flags)
} else {
/* GPIOx_ODR determines which resistor to activate in
* input mode, see Table 16 (datasheet rm0041) */
- if (flags & GPIO_PULL_UP) {
+ if ((flags & GPIO_PULL_UP) == GPIO_PULL_UP) {
mask |= 0x88888888 & cnf;
STM32_GPIO_BSRR_OFF(g->port) |= g->mask;
gpio_set_level(signal, 1);
- } else if (flags & GPIO_PULL_DOWN) {
+ } else if ((flags & GPIO_PULL_DOWN) == GPIO_PULL_DOWN) {
mask |= 0x88888888 & cnf;
gpio_set_level(signal, 0);
} else {