From 05cd707d283be1bc0432c181e1f1c590db9209ea Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 6 Apr 2021 09:56:41 +0200 Subject: arm/stm32h7: Add STM32H7_USART3_GPIO_* --- bsps/arm/stm32h7/console/console-usart3-cfg.c | 6 ++++-- spec/build/bsps/arm/stm32h7/grp.yml | 4 ++++ spec/build/bsps/arm/stm32h7/optusart3gpiopins.yml | 20 ++++++++++++++++++++ spec/build/bsps/arm/stm32h7/optusart3gpioregs.yml | 20 ++++++++++++++++++++ 4 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 spec/build/bsps/arm/stm32h7/optusart3gpiopins.yml create mode 100644 spec/build/bsps/arm/stm32h7/optusart3gpioregs.yml diff --git a/bsps/arm/stm32h7/console/console-usart3-cfg.c b/bsps/arm/stm32h7/console/console-usart3-cfg.c index b40f6da5aa..1043b449b6 100644 --- a/bsps/arm/stm32h7/console/console-usart3-cfg.c +++ b/bsps/arm/stm32h7/console/console-usart3-cfg.c @@ -31,11 +31,13 @@ #include +#include + const stm32h7_uart_config stm32h7_usart3_config = { .gpio = { - .regs = GPIOB, + .regs = STM32H7_USART3_GPIO_REGS, .config = { - .Pin = GPIO_PIN_9 | GPIO_PIN_10, + .Pin = STM32H7_USART3_GPIO_PINS, .Mode = GPIO_MODE_AF_PP, .Pull = GPIO_NOPULL, .Speed = GPIO_SPEED_FREQ_LOW, diff --git a/spec/build/bsps/arm/stm32h7/grp.yml b/spec/build/bsps/arm/stm32h7/grp.yml index 1158fd9cb2..2147cdec88 100644 --- a/spec/build/bsps/arm/stm32h7/grp.yml +++ b/spec/build/bsps/arm/stm32h7/grp.yml @@ -77,6 +77,10 @@ links: uid: optmemsrambackupsz - role: build-dependency uid: optprintkinstance +- role: build-dependency + uid: optusart3gpiopins +- role: build-dependency + uid: optusart3gpioregs - role: build-dependency uid: optvariant - role: build-dependency diff --git a/spec/build/bsps/arm/stm32h7/optusart3gpiopins.yml b/spec/build/bsps/arm/stm32h7/optusart3gpiopins.yml new file mode 100644 index 0000000000..59c939679a --- /dev/null +++ b/spec/build/bsps/arm/stm32h7/optusart3gpiopins.yml @@ -0,0 +1,20 @@ +actions: +- get-string: null +- define-unquoted: null +build-type: option +default: ( GPIO_PIN_8 | GPIO_PIN_9 ) +default-by-variant: +- value: ( GPIO_PIN_9 | GPIO_PIN_10 ) + variants: + - arm/nucleo-h743zi +default-by-variant: [] +enabled-by: true +format: '{}' +links: [] +name: STM32H7_USART3_GPIO_PINS +description: | + GPIO pins used for the USART3 pin configuration. +type: build +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) diff --git a/spec/build/bsps/arm/stm32h7/optusart3gpioregs.yml b/spec/build/bsps/arm/stm32h7/optusart3gpioregs.yml new file mode 100644 index 0000000000..bf5c6b933a --- /dev/null +++ b/spec/build/bsps/arm/stm32h7/optusart3gpioregs.yml @@ -0,0 +1,20 @@ +actions: +- get-string: null +- define-unquoted: null +build-type: option +default: GPIOD +default-by-variant: +- value: GPIOB + variants: + - arm/nucleo-h743zi +default-by-variant: [] +enabled-by: true +format: '{}' +links: [] +name: STM32H7_USART3_GPIO_REGS +description: | + GPIO registers used for the USART3 pin configuration. +type: build +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) -- cgit v1.2.3