Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STM32F0: Fix target codes for number of UARTs #15258

Merged
merged 1 commit into from
Apr 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions targets/TARGET_STM/TARGET_STM32F0/serial_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down