Fix setting alternate port functions on the STM32F2.

Thanks to Ricardo Martins.
This commit is contained in:
Gareth McMullin 2012-01-07 18:59:18 +13:00 committed by Piotr Esden-Tempski
parent 03e44e91e3
commit 2433f17e73

View File

@ -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