[rtems commit] arm/stm32h7: Add STM32H7_USART3_GPIO_*

Sebastian Huber sebh at rtems.org
Tue Apr 6 07:58:58 UTC 2021


Module:    rtems
Branch:    master
Commit:    05cd707d283be1bc0432c181e1f1c590db9209ea
Changeset: http://git.rtems.org/rtems/commit/?id=05cd707d283be1bc0432c181e1f1c590db9209ea

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Apr  6 09:56:41 2021 +0200

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(-)

diff --git a/bsps/arm/stm32h7/console/console-usart3-cfg.c b/bsps/arm/stm32h7/console/console-usart3-cfg.c
index b40f6da..1043b44 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 1158fd9..2147cde 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 0000000..59c9396
--- /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 0000000..bf5c6b9
--- /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)



More information about the vc mailing list