aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/ports/STM32/LLD/USARTv1/hal_uart_lld.c4
-rw-r--r--os/hal/ports/STM32/LLD/USARTv2/hal_uart_lld.c4
-rw-r--r--readme.txt2
3 files changed, 10 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;
}
diff --git a/readme.txt b/readme.txt
index f1d5da336..ef218e421 100644
--- a/readme.txt
+++ b/readme.txt
@@ -165,6 +165,8 @@
Updated the various platform.mk implementing "smart build" mode.
- RT: Fixed compile error with assertions enabled and dynamic extensions
disabled (bug #909)(backported to 17.6.4).
+- HAL: Fixed compile error HAL UART without WAIT (bug #908)(backported to
+ 17.6.4 and 16.1.10).
- RT: Fixed gcc7 implicit-fallthrough (bug #906)(backported to 17.6.4
and 16.1.10).
- HAL: Fixed gcc7 implicit-fallthrough (bug #906)(backported to 17.6.4