Skip to content

Commit ddacecc

Browse files
authored
Merge pull request ARMmbed#15258 from Nantis-GmbH/stm32-uart-num-fix
STM32F0: Fix target codes for number of UARTs
2 parents 18cddfa + 9ff3587 commit ddacecc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

targets/TARGET_STM/TARGET_STM32F0/serial_device.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717

1818
#include "serial_api_hal.h"
1919

20-
#if defined (TARGET_STM32F031K6)
20+
#if defined (TARGET_STM32F031x6)
2121
#define UART_NUM (1)
22-
#elif defined (TARGET_STM32F030R8) || defined (TARGET_STM32F051R8) || defined (TARGET_STM32F042K6)
22+
#elif defined (TARGET_STM32F030x8) || defined (TARGET_STM32F051x8) || defined (TARGET_STM32F042x6)
2323
#define UART_NUM (2)
24-
#elif defined (TARGET_STM32F070RB) || defined (TARGET_STM32F072RB)
24+
#elif defined (TARGET_STM32F070xB) || defined (TARGET_STM32F072xB)
2525
#define UART_NUM (4)
2626
#else
27-
#define UART_NUM (8) // max value (TARGET_STM32F091RC)
27+
#define UART_NUM (8) // max value (TARGET_STM32F091xC)
2828
#endif
2929

3030
uint32_t serial_irq_ids[UART_NUM] = {0};

0 commit comments

Comments
 (0)