aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/src/hal_uart.c4
-rw-r--r--readme.txt2
2 files changed, 4 insertions, 2 deletions
diff --git a/os/hal/src/hal_uart.c b/os/hal/src/hal_uart.c
index 8df77adb5..89276f28f 100644
--- a/os/hal/src/hal_uart.c
+++ b/os/hal/src/hal_uart.c
@@ -384,7 +384,7 @@ msg_t uartSendTimeout(UARTDriver *uartp, size_t *np,
/* Waiting for result.*/
msg = osalThreadSuspendTimeoutS(&uartp->threadtx, timeout);
if (msg != MSG_OK) {
- *np = uartStopSendI(uartp);
+ *np -= uartStopSendI(uartp);
}
osalSysUnlock();
@@ -475,7 +475,7 @@ msg_t uartReceiveTimeout(UARTDriver *uartp, size_t *np,
/* Waiting for result.*/
msg = osalThreadSuspendTimeoutS(&uartp->threadrx, timeout);
if (msg != MSG_OK) {
- *np = uartStopReceiveI(uartp);
+ *np -= uartStopReceiveI(uartp);
}
osalSysUnlock();
diff --git a/readme.txt b/readme.txt
index c1a7cc935..ca20c3aad 100644
--- a/readme.txt
+++ b/readme.txt
@@ -115,6 +115,8 @@
dependencies and configuration directories. This makes possible
to have multiple non-conflicting makefiles in the same project.
Updated the various platform.mk implementing "smart build" mode.
+- HAL: Fixed error in uartReceiveTimeout() and uartSendTimeout() (bug #883)
+ (backported to 17.6.1 and 16.1.9).
- HAL: Fixed TIMx DBL field macro broken (bug #880)(backported
to 17.6.1 and 16.1.9).
- HAL: Fixed STM32 SPI problem in spi_lld_start() (bug #879)(backported