aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD/USARTv2/hal_serial_lld.c
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2016-06-17 13:59:35 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2016-06-17 13:59:35 +0000
commitbd0d0251e24ada9247d6329f7f74365f576ffa08 (patch)
treef18d512e993564990a79f5aaad70a7ba601ed950 /os/hal/ports/STM32/LLD/USARTv2/hal_serial_lld.c
parent458e6a84df1beb84f21c7e57147dec8c44f1d751 (diff)
downloadChibiOS-bd0d0251e24ada9247d6329f7f74365f576ffa08.tar.gz
ChibiOS-bd0d0251e24ada9247d6329f7f74365f576ffa08.tar.bz2
ChibiOS-bd0d0251e24ada9247d6329f7f74365f576ffa08.zip
Fixes in STM32 serial driver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9641 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32/LLD/USARTv2/hal_serial_lld.c')
-rw-r--r--os/hal/ports/STM32/LLD/USARTv2/hal_serial_lld.c9
1 files changed, 9 insertions, 0 deletions
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)