From 6d5be72cf69875bbd181985b5dbe09aa74857e5a Mon Sep 17 00:00:00 2001 From: Frank Voorburg Date: Wed, 7 Dec 2022 11:02:58 +0000 Subject: [PATCH] Refs #1631. Added support for UART7 and UART8 in the RS232 driver of the STM32F4 port git-svn-id: https://svn.code.sf.net/p/openblt/code/trunk@1004 5dc33758-31d5-4daf-9ae8-b24bf3d40d73 --- Target/Source/ARMCM4_STM32F4/rs232.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Target/Source/ARMCM4_STM32F4/rs232.c b/Target/Source/ARMCM4_STM32F4/rs232.c index 8b4e65f4..05df7bfd 100644 --- a/Target/Source/ARMCM4_STM32F4/rs232.c +++ b/Target/Source/ARMCM4_STM32F4/rs232.c @@ -55,14 +55,20 @@ /** \brief Set UART base address to USART3. */ #define USART_CHANNEL USART3 #elif (BOOT_COM_RS232_CHANNEL_INDEX == 3) -/** \brief Set UART base address to USART4. */ -#define USART_CHANNEL USART4 +/** \brief Set UART base address to UART4. */ +#define USART_CHANNEL UART4 #elif (BOOT_COM_RS232_CHANNEL_INDEX == 4) -/** \brief Set UART base address to USART5. */ -#define USART_CHANNEL USART5 +/** \brief Set UART base address to UART5. */ +#define USART_CHANNEL UART5 #elif (BOOT_COM_RS232_CHANNEL_INDEX == 5) -/** \brief Set UART base address to USART6. */ +/** \brief Set UART base address to UART6. */ #define USART_CHANNEL USART6 +#elif (BOOT_COM_RS232_CHANNEL_INDEX == 6) +/** \brief Set UART base address to UART7. */ +#define USART_CHANNEL UART7 +#elif (BOOT_COM_RS232_CHANNEL_INDEX == 7) +/** \brief Set UART base address to UART8. */ +#define USART_CHANNEL UART8 #endif @@ -90,7 +96,9 @@ void Rs232Init(void) (BOOT_COM_RS232_CHANNEL_INDEX == 2) || (BOOT_COM_RS232_CHANNEL_INDEX == 3) || (BOOT_COM_RS232_CHANNEL_INDEX == 4) || - (BOOT_COM_RS232_CHANNEL_INDEX == 5)); + (BOOT_COM_RS232_CHANNEL_INDEX == 5) || + (BOOT_COM_RS232_CHANNEL_INDEX == 6) || + (BOOT_COM_RS232_CHANNEL_INDEX == 7)); /* disable the UART peripheral */ LL_USART_Disable(USART_CHANNEL);