From b9857745b1c6f6082e6bb85fda1a0d9ca15af8f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Mon, 11 May 2020 21:52:11 +0200 Subject: [PATCH] Fix parentheses in macros --- stm-firmware/include/stm-periph/stm32-gpio-macros.h | 1 + 1 file changed, 1 insertion(+) diff --git a/stm-firmware/include/stm-periph/stm32-gpio-macros.h b/stm-firmware/include/stm-periph/stm32-gpio-macros.h index f94e4da..0dd3097 100644 --- a/stm-firmware/include/stm-periph/stm32-gpio-macros.h +++ b/stm-firmware/include/stm-periph/stm32-gpio-macros.h @@ -25,6 +25,7 @@ #define PUPDR_DELETE(pin) ~(0x3U << ((pin) * 2)) #define OUTPUT(pin) (0x01U << ((pin) * 2)) #define PULLUP(pin) (0x1U << ((pin)* 2)) +#define PULLDOWN(pin) (0x2U << ((pin)* 2)) #define ALTFUNC(pin) ((0x2) << ((pin) * 2)) #define PINMASK(pin) ((0x3) << ((pin) * 2)) #define SETAF(PORT,PIN,AF) PORT->AFR[((PIN) < 8 ? 0 : 1)] |= (AF) << (((PIN) < 8 ? (PIN) : ((PIN) - 8)) * 4)