diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-09-05 12:12:31 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-09-05 12:12:31 +0000 |
commit | 9fa7ba7b562aadfc9735c03d239375596a2d7233 (patch) | |
tree | 68a26943307b356bde217217817a2efc78eadaf0 /os/hal/src | |
parent | b6342056a60d37c89724ab5b310ff85e4a16b9c3 (diff) | |
download | ChibiOS-9fa7ba7b562aadfc9735c03d239375596a2d7233.tar.gz ChibiOS-9fa7ba7b562aadfc9735c03d239375596a2d7233.tar.bz2 ChibiOS-9fa7ba7b562aadfc9735c03d239375596a2d7233.zip |
Fixed bug #883.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10558 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/src')
-rw-r--r-- | os/hal/src/hal_uart.c | 4 |
1 files changed, 2 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();
|