Skip to content

Commit

Permalink
STM32F0: Fix target codes for number of UARTs
Browse files Browse the repository at this point in the history
  • Loading branch information
boraozgen committed Apr 4, 2022
1 parent 2eb06e7 commit 9ca7bac
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit 9ca7bac

Please sign in to comment.