From bd0d0251e24ada9247d6329f7f74365f576ffa08 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Fri, 17 Jun 2016 13:59:35 +0000 Subject: Fixes in STM32 serial driver. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9641 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/ports/STM32/LLD/USARTv2/hal_serial_lld.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'os/hal/ports/STM32/LLD') diff --git a/os/hal/ports/STM32/LLD/USARTv2/hal_serial_lld.c b/os/hal/ports/STM32/LLD/USARTv2/hal_serial_lld.c index 01515204c..8ce14eaeb 100644 --- a/os/hal/ports/STM32/LLD/USARTv2/hal_serial_lld.c +++ b/os/hal/ports/STM32/LLD/USARTv2/hal_serial_lld.c @@ -44,6 +44,15 @@ #define USART_ISR_LBDF USART_ISR_LBD #endif +/* Handling differences in frame size bits.*/ +#if !defined(USART_CR1_M_0) +#define USART_CR1_M_0 (1 << 12) +#endif + +#if !defined(USART_CR1_M_1) +#define USART_CR1_M_1 (1 << 28) +#endif + /* Handling the case where UART4 and UART5 are actually USARTs, this happens in the STM32F0xx.*/ #if defined(USART4) -- cgit v1.2.3