From 2c535106ee5bbbcc019cb0820d1a5fcf0639eb9e Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 16 Sep 2019 11:45:36 -0400 Subject: stm32: Initial support for stm32f070 Signed-off-by: Kevin O'Connor --- src/stm32/gpio.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/stm32/gpio.c') diff --git a/src/stm32/gpio.c b/src/stm32/gpio.c index de56e168..aab7dd87 100644 --- a/src/stm32/gpio.c +++ b/src/stm32/gpio.c @@ -15,9 +15,13 @@ DECL_ENUMERATION_RANGE("pin", "PA0", GPIO('A', 0), 16); DECL_ENUMERATION_RANGE("pin", "PB0", GPIO('B', 0), 16); DECL_ENUMERATION_RANGE("pin", "PC0", GPIO('C', 0), 16); DECL_ENUMERATION_RANGE("pin", "PD0", GPIO('D', 0), 16); +#ifdef GPIOE DECL_ENUMERATION_RANGE("pin", "PE0", GPIO('E', 0), 16); -#ifdef GPIOH +#endif +#ifdef GPIOF DECL_ENUMERATION_RANGE("pin", "PF0", GPIO('F', 0), 16); +#endif +#ifdef GPIOH DECL_ENUMERATION_RANGE("pin", "PG0", GPIO('G', 0), 16); DECL_ENUMERATION_RANGE("pin", "PH0", GPIO('H', 0), 16); #endif @@ -26,9 +30,15 @@ DECL_ENUMERATION_RANGE("pin", "PI0", GPIO('I', 0), 16); #endif GPIO_TypeDef * const digital_regs[] = { - ['A' - 'A'] = GPIOA, GPIOB, GPIOC, GPIOD, GPIOE, + ['A' - 'A'] = GPIOA, GPIOB, GPIOC, GPIOD, +#ifdef GPIOE + ['E' - 'A'] = GPIOE, +#endif +#ifdef GPIOF + ['F' - 'A'] = GPIOF, +#endif #ifdef GPIOH - ['F' - 'A'] = GPIOF, GPIOG, GPIOH, + ['G' - 'A'] = GPIOG, GPIOH, #endif #ifdef GPIOI ['I' - 'A'] = GPIOI, -- cgit v1.2.3-70-g09d2