summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/stm32/stm32_lowputc.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/arm/src/stm32/stm32_lowputc.c')
-rw-r--r--nuttx/arch/arm/src/stm32/stm32_lowputc.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_lowputc.c b/nuttx/arch/arm/src/stm32/stm32_lowputc.c
index 63d6e6b9c..968d9b5f6 100644
--- a/nuttx/arch/arm/src/stm32/stm32_lowputc.c
+++ b/nuttx/arch/arm/src/stm32/stm32_lowputc.c
@@ -145,7 +145,6 @@
# define STM32_CONSOLE_RS485_DIR_POLARITY true
# endif
# endif
-
# elif defined(CONFIG_USART6_SERIAL_CONSOLE)
# define STM32_CONSOLE_BASE STM32_USART6_BASE
# define STM32_APBCLOCK STM32_PCLK2_FREQUENCY
@@ -163,6 +162,40 @@
# define STM32_CONSOLE_RS485_DIR_POLARITY true
# endif
# endif
+# elif defined(CONFIG_UART7_SERIAL_CONSOLE)
+# define STM32_CONSOLE_BASE STM32_UART7_BASE
+# define STM32_APBCLOCK STM32_PCLK1_FREQUENCY
+# define STM32_CONSOLE_BAUD CONFIG_UART7_BAUD
+# define STM32_CONSOLE_BITS CONFIG_UART7_BITS
+# define STM32_CONSOLE_PARITY CONFIG_UART7_PARITY
+# define STM32_CONSOLE_2STOP CONFIG_UART7_2STOP
+# define STM32_CONSOLE_TX GPIO_UART7_TX
+# define STM32_CONSOLE_RX GPIO_UART7_RX
+# ifdef CONFIG_UART7_RS485
+# define STM32_CONSOLE_RS485_DIR GPIO_UART7_RS485_DIR
+# if (CONFIG_UART7_RS485_DIR_POLARITY == 0)
+# define STM32_CONSOLE_RS485_DIR_POLARITY false
+# else
+# define STM32_CONSOLE_RS485_DIR_POLARITY true
+# endif
+# endif
+# elif defined(CONFIG_UART8_SERIAL_CONSOLE)
+# define STM32_CONSOLE_BASE STM32_UART8_BASE
+# define STM32_APBCLOCK STM32_PCLK1_FREQUENCY
+# define STM32_CONSOLE_BAUD CONFIG_UART8_BAUD
+# define STM32_CONSOLE_BITS CONFIG_UART8_BITS
+# define STM32_CONSOLE_PARITY CONFIG_UART8_PARITY
+# define STM32_CONSOLE_2STOP CONFIG_UART8_2STOP
+# define STM32_CONSOLE_TX GPIO_UART8_TX
+# define STM32_CONSOLE_RX GPIO_UART8_RX
+# ifdef CONFIG_UART8_RS485
+# define STM32_CONSOLE_RS485_DIR GPIO_UART8_RS485_DIR
+# if (CONFIG_UART8_RS485_DIR_POLARITY == 0)
+# define STM32_CONSOLE_RS485_DIR_POLARITY false
+# else
+# define STM32_CONSOLE_RS485_DIR_POLARITY true
+# endif
+# endif
# endif
/* CR1 settings */