diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-12-29 09:47:19 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-12-29 09:47:19 +0000 |
commit | 19ede34bedb36684ff607dde29ec417cacafb75f (patch) | |
tree | 960c194f569d2a695931a07bc241b67f76dab96b /os/hal/ports/STM32 | |
parent | 1417f92116066bcd6d7a724ba2ffacc97fe87271 (diff) | |
download | ChibiOS-19ede34bedb36684ff607dde29ec417cacafb75f.tar.gz ChibiOS-19ede34bedb36684ff607dde29ec417cacafb75f.tar.bz2 ChibiOS-19ede34bedb36684ff607dde29ec417cacafb75f.zip |
Fixed bug #908.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11209 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32')
-rw-r--r-- | os/hal/ports/STM32/LLD/USARTv1/hal_uart_lld.c | 4 | ||||
-rw-r--r-- | os/hal/ports/STM32/LLD/USARTv2/hal_uart_lld.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/os/hal/ports/STM32/LLD/USARTv1/hal_uart_lld.c b/os/hal/ports/STM32/LLD/USARTv1/hal_uart_lld.c index 8cb5c1a8f..54c1632b3 100644 --- a/os/hal/ports/STM32/LLD/USARTv1/hal_uart_lld.c +++ b/os/hal/ports/STM32/LLD/USARTv1/hal_uart_lld.c @@ -733,7 +733,11 @@ void uart_lld_start_send(UARTDriver *uartp, size_t n, const void *txbuf) { /* Only enable TC interrupt if there's a callback attached to it or
if called from uartSendFullTimeout(). Also we need to clear TC flag
which could be set before.*/
+#if UART_USE_WAIT == TRUE
if ((uartp->config->txend2_cb != NULL) || (uartp->early == false)) {
+#else
+ if (uartp->config->txend2_cb != NULL) {
+#endif
uartp->usart->SR = ~USART_SR_TC;
uartp->usart->CR1 |= USART_CR1_TCIE;
}
diff --git a/os/hal/ports/STM32/LLD/USARTv2/hal_uart_lld.c b/os/hal/ports/STM32/LLD/USARTv2/hal_uart_lld.c index 505cd537a..9fd66fa87 100644 --- a/os/hal/ports/STM32/LLD/USARTv2/hal_uart_lld.c +++ b/os/hal/ports/STM32/LLD/USARTv2/hal_uart_lld.c @@ -956,7 +956,11 @@ void uart_lld_start_send(UARTDriver *uartp, size_t n, const void *txbuf) { /* Only enable TC interrupt if there's a callback attached to it or
if called from uartSendFullTimeout(). Also we need to clear TC flag
which could be set before.*/
+#if UART_USE_WAIT == TRUE
if ((uartp->config->txend2_cb != NULL) || (uartp->early == false)) {
+#else
+ if (uartp->config->txend2_cb != NULL) {
+#endif
uartp->usart->ICR = USART_ICR_TCCF;
uartp->usart->CR1 |= USART_CR1_TCIE;
}
|