Skip to content

Commit 3722520

Browse files
committed
Avoid default UART_NUM value
Signed-off-by: Frederic.Pillon <[email protected]>
1 parent bfd0d0a commit 3722520

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cores/arduino/stm32/uart.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,13 @@
7070
#define UART_NUM (8)
7171
#elif defined(STM32F2xx)
7272
#define UART_NUM (6)
73-
#else // STM32F1xx || STM32F3xx || STM32L0xx || STM32L1xx || STM32L4xx
73+
#elif defined(STM32F1xx) || defined(STM32F3xx) ||\
74+
defined(STM32L0xx) || defined(STM32L1xx) || defined(STM32L4xx)
7475
#define UART_NUM (5)
76+
#else
77+
#error "Unknown Family - unknown UART_NUM"
7578
#endif
79+
7680
static UART_HandleTypeDef *uart_handlers[UART_NUM] = {NULL};
7781
static void (*rx_callback[UART_NUM])(serial_t*);
7882
static serial_t *rx_callback_obj[UART_NUM];

0 commit comments

Comments
 (0)