aboutsummaryrefslogtreecommitdiff
path: root/include/libopencm3/stm32/f4/gpio.h
diff options
context:
space:
mode:
authorFergus Noble2012-03-21 20:16:10 -0700
committerFergus Noble2012-03-21 20:16:10 -0700
commit87ea496ca768d18e51d8654cbad9cb261a881b1b (patch)
treed13770d6cc0c0f21b04f372af423630956e24c01 /include/libopencm3/stm32/f4/gpio.h
parent26de4cb9d6e7c335c18f3f5e0a4da7c4170851f3 (diff)
Revert "Fix setting alternate port functions on the STM32F4."
This was also fixed in ac29b654a992a4855626fc0b92874d3847914f85 in a different way. I think the mask definition should be left with 1s indicating the bits of interest. This reverts commit e11185d47d0a2fea6d2782761edd5fd489541512.
Diffstat (limited to 'include/libopencm3/stm32/f4/gpio.h')
-rw-r--r--include/libopencm3/stm32/f4/gpio.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/libopencm3/stm32/f4/gpio.h b/include/libopencm3/stm32/f4/gpio.h
index 4981c2a..a5b4361 100644
--- a/include/libopencm3/stm32/f4/gpio.h
+++ b/include/libopencm3/stm32/f4/gpio.h
@@ -232,7 +232,7 @@
/* See Datasheet Table 6 (pg. 48) for alternate function mappings. */
#define GPIO_AFR(n, af) (af << ((n) * 4))
-#define GPIO_AFR_MASK(n) ~(0xf << ((n) * 4))
+#define GPIO_AFR_MASK(n) (0xf << ((n) * 4))
#define GPIO_AF0 0x0
#define GPIO_AF1 0x1
#define GPIO_AF2 0x2