From 08eef2a700dd735a42d71b439b89a6792278a2ed Mon Sep 17 00:00:00 2001 From: Takumi Ando Date: Tue, 9 May 2023 15:56:52 +0900 Subject: [PATCH] stm32f0l0g0: Fix GPIO port definitions These series have the following GPIO ports: - STM32F03X: A to D, and F - STM32F05/07/09X: A to F - STM32G0X: A to F - STM32L0X: A to E, and H Signed-off-by: Takumi Ando --- arch/arm/src/stm32f0l0g0/stm32_gpio.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/src/stm32f0l0g0/stm32_gpio.h b/arch/arm/src/stm32f0l0g0/stm32_gpio.h index d9e5b004fc..68ad753151 100644 --- a/arch/arm/src/stm32f0l0g0/stm32_gpio.h +++ b/arch/arm/src/stm32f0l0g0/stm32_gpio.h @@ -186,8 +186,16 @@ # define GPIO_PORTB (1 << GPIO_PORT_SHIFT) /* GPIOB */ # define GPIO_PORTC (2 << GPIO_PORT_SHIFT) /* GPIOC */ # define GPIO_PORTD (3 << GPIO_PORT_SHIFT) /* GPIOD */ +#if defined (CONFIG_STM32F0L0G0_STM32F03X) +# define GPIO_PORTF (4 << GPIO_PORT_SHIFT) /* GPIOF */ +#else # define GPIO_PORTE (4 << GPIO_PORT_SHIFT) /* GPIOE */ +#if defined (CONFIG_ARCH_CHIP_STM32L0) +# define GPIO_PORTH (5 << GPIO_PORT_SHIFT) /* GPIOH */ +#else # define GPIO_PORTF (5 << GPIO_PORT_SHIFT) /* GPIOF */ +#endif +#endif /* This identifies the bit in the port: *