summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-04-06 09:56:41 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-04-06 09:56:41 +0200
commit05cd707d283be1bc0432c181e1f1c590db9209ea (patch)
treea61b78f99b0d434abb7287c68820bebd61e2598d
parentarm/stm32h7: Add STM32H7_HSE_FREQUENCY (diff)
downloadrtems-05cd707d283be1bc0432c181e1f1c590db9209ea.tar.bz2
arm/stm32h7: Add STM32H7_USART3_GPIO_*
-rw-r--r--bsps/arm/stm32h7/console/console-usart3-cfg.c6
-rw-r--r--spec/build/bsps/arm/stm32h7/grp.yml4
-rw-r--r--spec/build/bsps/arm/stm32h7/optusart3gpiopins.yml20
-rw-r--r--spec/build/bsps/arm/stm32h7/optusart3gpioregs.yml20
4 files changed, 48 insertions, 2 deletions
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 <stm32h7/hal.h>
+#include <bspopts.h>
+
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
@@ -78,6 +78,10 @@ links:
- role: build-dependency
uid: optprintkinstance
- role: build-dependency
+ uid: optusart3gpiopins
+- role: build-dependency
+ uid: optusart3gpioregs
+- role: build-dependency
uid: optvariant
- role: build-dependency
uid: ../../optconsolebaud
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)