From 6bb74a6edc2e4324e4de41b99315ddc7e2159185 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Fri, 16 Oct 2015 08:33:20 +0000 Subject: STM32F0xx USARTs workaround. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8367 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/ports/STM32/LLD/USARTv2/serial_lld.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'os') 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 /*===========================================================================*/ -- cgit v1.2.3