Merge pull request #15258 from Nantis-GmbH/stm32-uart-num-fix

STM32F0: Fix target codes for number of UARTs
pull/15261/head
Martin Kojtal 2022-04-05 10:24:13 +02:00 committed by GitHub
commit ddaceccf5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -17,14 +17,14 @@
#include "serial_api_hal.h"
#if defined (TARGET_STM32F031K6)
#if defined (TARGET_STM32F031x6)
#define UART_NUM (1)
#elif defined (TARGET_STM32F030R8) || defined (TARGET_STM32F051R8) || defined (TARGET_STM32F042K6)
#elif defined (TARGET_STM32F030x8) || defined (TARGET_STM32F051x8) || defined (TARGET_STM32F042x6)
#define UART_NUM (2)
#elif defined (TARGET_STM32F070RB) || defined (TARGET_STM32F072RB)
#elif defined (TARGET_STM32F070xB) || defined (TARGET_STM32F072xB)
#define UART_NUM (4)
#else
#define UART_NUM (8) // max value (TARGET_STM32F091RC)
#define UART_NUM (8) // max value (TARGET_STM32F091xC)
#endif
uint32_t serial_irq_ids[UART_NUM] = {0};