From e9399566d7eaa76ca6114d108d1b7bf34fca157b Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Thu, 17 May 2018 10:51:04 +0000 Subject: Fixed bug #948. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12040 110e8d01-0319-4d1e-a829-52ad28d1bb01 --- os/hal/src/hal_uart.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'os/hal/src') diff --git a/os/hal/src/hal_uart.c b/os/hal/src/hal_uart.c index dd9f4a6d2..2d6a4c408 100644 --- a/os/hal/src/hal_uart.c +++ b/os/hal/src/hal_uart.c @@ -188,7 +188,7 @@ void uartStartSendI(UARTDriver *uartp, size_t n, const void *txbuf) { * * @return The number of data frames not transmitted by the * stopped transmit operation. - * @retval 0 There was no transmit operation in progress. + * @retval UART_ERR_NOT_ACTIVE if there was no transmit operation in progress. * * @api */ @@ -205,7 +205,7 @@ size_t uartStopSend(UARTDriver *uartp) { uartp->txstate = UART_TX_IDLE; } else { - n = 0; + n = UART_ERR_NOT_ACTIVE; } osalSysUnlock(); @@ -221,7 +221,7 @@ size_t uartStopSend(UARTDriver *uartp) { * * @return The number of data frames not transmitted by the * stopped transmit operation. - * @retval 0 There was no transmit operation in progress. + * @retval UART_ERR_NOT_ACTIVE if there was no transmit operation in progress. * * @iclass */ @@ -236,7 +236,7 @@ size_t uartStopSendI(UARTDriver *uartp) { uartp->txstate = UART_TX_IDLE; return n; } - return 0; + return UART_ERR_NOT_ACTIVE; } /** @@ -294,7 +294,7 @@ void uartStartReceiveI(UARTDriver *uartp, size_t n, void *rxbuf) { * * @return The number of data frames not received by the * stopped receive operation. - * @retval 0 There was no receive operation in progress. + * @retval UART_ERR_NOT_ACTIVE if there was no receive operation in progress. * * @api */ @@ -311,7 +311,7 @@ size_t uartStopReceive(UARTDriver *uartp) { uartp->rxstate = UART_RX_IDLE; } else { - n = 0; + n = UART_ERR_NOT_ACTIVE; } osalSysUnlock(); @@ -327,7 +327,7 @@ size_t uartStopReceive(UARTDriver *uartp) { * * @return The number of data frames not received by the * stopped receive operation. - * @retval 0 There was no receive operation in progress. + * @retval UART_ERR_NOT_ACTIVE if there was no receive operation in progress. * * @iclass */ @@ -342,7 +342,7 @@ size_t uartStopReceiveI(UARTDriver *uartp) { uartp->rxstate = UART_RX_IDLE; return n; } - return 0; + return UART_ERR_NOT_ACTIVE; } #if (UART_USE_WAIT == TRUE) || defined(__DOXYGEN__) -- cgit v1.2.3