1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 22:13:52 +01:00

boards/common/nucleo144: fix Arduino A0...A5 config for L5, U5 boards

Nucleo144 boards for L5 and U5 have a completely different analog pin configuration. It's a very small change, but due to style changes it seems like a big change. In fact, the configuration has been changed just by adding an #ifdef ... #else ... #end and the six analog pins for L5 and U5 boards.
This commit is contained in:
Gunar Schorcht 2025-08-18 09:50:02 +02:00
parent 8f903b3291
commit 04a0aba28a

View File

@ -59,22 +59,31 @@ extern "C" {
#define ARDUINO_PIN_14 GPIO_PIN(PORT_B, 9)
#define ARDUINO_PIN_15 GPIO_PIN(PORT_B, 8)
#define ARDUINO_PIN_16 GPIO_PIN(PORT_A, 3)
#define ARDUINO_PIN_17 GPIO_PIN(PORT_C, 0)
#define ARDUINO_PIN_18 GPIO_PIN(PORT_C, 3)
#if defined(CPU_MODEL_STM32F413ZH) || defined(CPU_MODEL_STM32F412ZG) || \
defined(CPU_MODEL_STM32L496ZG)
# define ARDUINO_PIN_19 GPIO_PIN(PORT_C, 1)
# define ARDUINO_PIN_20 GPIO_PIN(PORT_C, 4)
# define ARDUINO_PIN_21 GPIO_PIN(PORT_C, 5)
#elif defined(CPU_MODEL_STM32F303ZE)
# define ARDUINO_PIN_19 GPIO_PIN(PORT_D, 11)
# define ARDUINO_PIN_20 GPIO_PIN(PORT_D, 12)
# define ARDUINO_PIN_21 GPIO_PIN(PORT_D, 13)
#if defined(CPU_FAM_STM32L5) || defined(CPU_FAM_STM32U5)
# define ARDUINO_PIN_16 GPIO_PIN(PORT_A, 3)
# define ARDUINO_PIN_17 GPIO_PIN(PORT_A, 2)
# define ARDUINO_PIN_18 GPIO_PIN(PORT_C, 3)
# define ARDUINO_PIN_19 GPIO_PIN(PORT_B, 0)
# define ARDUINO_PIN_20 GPIO_PIN(PORT_C, 1)
# define ARDUINO_PIN_21 GPIO_PIN(PORT_C, 0)
#else
# define ARDUINO_PIN_19 GPIO_PIN(PORT_F, 3)
# define ARDUINO_PIN_20 GPIO_PIN(PORT_F, 5)
# define ARDUINO_PIN_21 GPIO_PIN(PORT_F, 10)
# define ARDUINO_PIN_16 GPIO_PIN(PORT_A, 3)
# define ARDUINO_PIN_17 GPIO_PIN(PORT_C, 0)
# define ARDUINO_PIN_18 GPIO_PIN(PORT_C, 3)
# if defined(CPU_MODEL_STM32F413ZH) || defined(CPU_MODEL_STM32F412ZG) || \
defined(CPU_FAM_STM32L4)
# define ARDUINO_PIN_19 GPIO_PIN(PORT_C, 1)
# define ARDUINO_PIN_20 GPIO_PIN(PORT_C, 4)
# define ARDUINO_PIN_21 GPIO_PIN(PORT_C, 5)
# elif defined(CPU_MODEL_STM32F303ZE)
# define ARDUINO_PIN_19 GPIO_PIN(PORT_D, 11)
# define ARDUINO_PIN_20 GPIO_PIN(PORT_D, 12)
# define ARDUINO_PIN_21 GPIO_PIN(PORT_D, 13)
# else
# define ARDUINO_PIN_19 GPIO_PIN(PORT_F, 3)
# define ARDUINO_PIN_20 GPIO_PIN(PORT_F, 5)
# define ARDUINO_PIN_21 GPIO_PIN(PORT_F, 10)
# endif
#endif
#define ARDUINO_PIN_LAST 21