Fixed bug #948.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12040 110e8d01-0319-4d1e-a829-52ad28d1bb01
This commit is contained in:
parent
9c5361af2a
commit
e9399566d7
|
@ -43,6 +43,13 @@
|
||||||
#define UART_BREAK_DETECTED 64 /**< @brief Break detected. */
|
#define UART_BREAK_DETECTED 64 /**< @brief Break detected. */
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name UART error conditions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define UART_ERR_NOT_ACTIVE (size_t)-1
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver pre-compile time settings. */
|
/* Driver pre-compile time settings. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
|
@ -188,7 +188,7 @@ void uartStartSendI(UARTDriver *uartp, size_t n, const void *txbuf) {
|
||||||
*
|
*
|
||||||
* @return The number of data frames not transmitted by the
|
* @return The number of data frames not transmitted by the
|
||||||
* stopped transmit operation.
|
* 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
|
* @api
|
||||||
*/
|
*/
|
||||||
|
@ -205,7 +205,7 @@ size_t uartStopSend(UARTDriver *uartp) {
|
||||||
uartp->txstate = UART_TX_IDLE;
|
uartp->txstate = UART_TX_IDLE;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
n = 0;
|
n = UART_ERR_NOT_ACTIVE;
|
||||||
}
|
}
|
||||||
osalSysUnlock();
|
osalSysUnlock();
|
||||||
|
|
||||||
|
@ -221,7 +221,7 @@ size_t uartStopSend(UARTDriver *uartp) {
|
||||||
*
|
*
|
||||||
* @return The number of data frames not transmitted by the
|
* @return The number of data frames not transmitted by the
|
||||||
* stopped transmit operation.
|
* 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
|
* @iclass
|
||||||
*/
|
*/
|
||||||
|
@ -236,7 +236,7 @@ size_t uartStopSendI(UARTDriver *uartp) {
|
||||||
uartp->txstate = UART_TX_IDLE;
|
uartp->txstate = UART_TX_IDLE;
|
||||||
return n;
|
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
|
* @return The number of data frames not received by the
|
||||||
* stopped receive operation.
|
* 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
|
* @api
|
||||||
*/
|
*/
|
||||||
|
@ -311,7 +311,7 @@ size_t uartStopReceive(UARTDriver *uartp) {
|
||||||
uartp->rxstate = UART_RX_IDLE;
|
uartp->rxstate = UART_RX_IDLE;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
n = 0;
|
n = UART_ERR_NOT_ACTIVE;
|
||||||
}
|
}
|
||||||
osalSysUnlock();
|
osalSysUnlock();
|
||||||
|
|
||||||
|
@ -327,7 +327,7 @@ size_t uartStopReceive(UARTDriver *uartp) {
|
||||||
*
|
*
|
||||||
* @return The number of data frames not received by the
|
* @return The number of data frames not received by the
|
||||||
* stopped receive operation.
|
* 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
|
* @iclass
|
||||||
*/
|
*/
|
||||||
|
@ -342,7 +342,7 @@ size_t uartStopReceiveI(UARTDriver *uartp) {
|
||||||
uartp->rxstate = UART_RX_IDLE;
|
uartp->rxstate = UART_RX_IDLE;
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
return 0;
|
return UART_ERR_NOT_ACTIVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (UART_USE_WAIT == TRUE) || defined(__DOXYGEN__)
|
#if (UART_USE_WAIT == TRUE) || defined(__DOXYGEN__)
|
||||||
|
|
|
@ -126,6 +126,8 @@
|
||||||
- EX: Updated LIS302DL to 1.1.0 (backported to 18.2.1).
|
- EX: Updated LIS302DL to 1.1.0 (backported to 18.2.1).
|
||||||
- EX: Updated LPS25H to 1.1.0 (backported to 18.2.1).
|
- EX: Updated LPS25H to 1.1.0 (backported to 18.2.1).
|
||||||
- EX: Updated LSM303DLHC to 1.1.0 (backported to 18.2.1).
|
- EX: Updated LSM303DLHC to 1.1.0 (backported to 18.2.1).
|
||||||
|
- HAL: Fixed missing definition in UART driver (bug #948)(backported
|
||||||
|
to 18.2.2).
|
||||||
- OTH: Fixed wrong macro check in GCC Cortex-M startup files (bug #947)
|
- OTH: Fixed wrong macro check in GCC Cortex-M startup files (bug #947)
|
||||||
(backported to 18.2.2 and 17.6.5).
|
(backported to 18.2.2 and 17.6.5).
|
||||||
- HAL: Fixed binary instead of logic operator in STM32F4 HAL (bug #946)
|
- HAL: Fixed binary instead of logic operator in STM32F4 HAL (bug #946)
|
||||||
|
|
Loading…
Reference in New Issue