stm32f4: Add support for full range of GPIO pins

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2019-07-28 11:53:28 -04:00
parent bc9c8cd7a0
commit 9bc3a29ee4
3 changed files with 44 additions and 30 deletions

View File

@@ -4,6 +4,8 @@
#include "stm32f4xx.h"
extern GPIO_TypeDef * const digital_regs[];
#define GPIO(PORT, NUM) (((PORT)-'A') * 16 + (NUM))
#define GPIO2PORT(PIN) ((PIN) / 16)
#define GPIO2BIT(PIN) (1<<((PIN) % 16))