aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
Diffstat (limited to 'os')
-rw-r--r--os/hal/ports/STM32/LLD/USARTv2/serial_lld.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/os/hal/ports/STM32/LLD/USARTv2/serial_lld.c b/os/hal/ports/STM32/LLD/USARTv2/serial_lld.c
index a974e7e89..1d030621e 100644
--- a/os/hal/ports/STM32/LLD/USARTv2/serial_lld.c
+++ b/os/hal/ports/STM32/LLD/USARTv2/serial_lld.c
@@ -30,7 +30,7 @@
/* Driver local definitions. */
/*===========================================================================*/
-/* For compatibility for those devices without LIN support in the USARTS.*/
+/* For compatibility for those devices without LIN support in the USARTs.*/
#if !defined(USART_ISR_LBDF)
#define USART_ISR_LBDF 0
#endif
@@ -41,7 +41,17 @@
/* STM32L0xx/STM32F7xx ST headers difference.*/
#if !defined(USART_ISR_LBDF)
-#define USART_ISR_LBDF USART_ISR_LBD
+#define USART_ISR_LBDF USART_ISR_LBD
+#endif
+
+/* Handling the case where UART4 and UART5 are actually USARTs, this happens
+ in the STM32F0xx.*/
+#if defined(USART4)
+#define UART4 USART4
+#endif
+
+#if defined(USART5)
+#define UART5 USART5
#endif
/*===========================================================================*/