Fixed bug 3600789.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5080 35acf78f-673a-0410-8e92-d51de3d6d3f4
master
gdisirio 2013-01-19 08:01:56 +00:00
parent 78116c8564
commit 844c70e2e5
2 changed files with 18 additions and 9 deletions

View File

@ -143,8 +143,10 @@ void uartStartSend(UARTDriver *uartp, size_t n, const void *txbuf) {
"uartStartSend");
chSysLock();
chDbgAssert((uartp->state == UART_READY) && (uartp->txstate == UART_TX_IDLE),
"uartStartSend(), #1", "not active");
chDbgAssert(uartp->state == UART_READY,
"uartStartSend(), #1", "is active");
chDbgAssert(uartp->txstate != UART_TX_ACTIVE,
"uartStartSend(), #2", "tx active");
uart_lld_start_send(uartp, n, txbuf);
uartp->txstate = UART_TX_ACTIVE;
@ -168,9 +170,10 @@ void uartStartSendI(UARTDriver *uartp, size_t n, const void *txbuf) {
chDbgCheckClassI();
chDbgCheck((uartp != NULL) && (n > 0) && (txbuf != NULL),
"uartStartSendI");
chDbgAssert((uartp->state == UART_READY) &&
(uartp->txstate != UART_TX_ACTIVE),
"uartStartSendI(), #1", "not active");
chDbgAssert(uartp->state == UART_READY,
"uartStartSendI(), #1", "is active");
chDbgAssert(uartp->txstate != UART_TX_ACTIVE,
"uartStartSendI(), #2", "tx active");
uart_lld_start_send(uartp, n, txbuf);
uartp->txstate = UART_TX_ACTIVE;
@ -250,8 +253,10 @@ void uartStartReceive(UARTDriver *uartp, size_t n, void *rxbuf) {
"uartStartReceive");
chSysLock();
chDbgAssert((uartp->state == UART_READY) && (uartp->rxstate == UART_RX_IDLE),
"uartStartReceive(), #1", "not active");
chDbgAssert(uartp->state == UART_READY,
"uartStartReceive(), #1", "is active");
chDbgAssert(uartp->rxstate != UART_RX_ACTIVE,
"uartStartReceive(), #2", "rx active");
uart_lld_start_receive(uartp, n, rxbuf);
uartp->rxstate = UART_RX_ACTIVE;
@ -275,8 +280,10 @@ void uartStartReceiveI(UARTDriver *uartp, size_t n, void *rxbuf) {
chDbgCheckClassI();
chDbgCheck((uartp != NULL) && (n > 0) && (rxbuf != NULL),
"uartStartReceiveI");
chDbgAssert((uartp->state == UART_READY) && (uartp->rxstate == UART_RX_IDLE),
"uartStartReceiveI(), #1", "not active");
chDbgAssert(uartp->state == UART_READY,
"uartStartReceiveI(), #1", "is active");
chDbgAssert(uartp->rxstate != UART_RX_ACTIVE,
"uartStartReceiveI(), #2", "rx active");
uart_lld_start_receive(uartp, n, rxbuf);
uartp->rxstate = UART_RX_ACTIVE;

View File

@ -84,6 +84,8 @@
*** 2.5.2 ***
- FIX: Fixed state checker error in MSP430 port (bug 3601460)(backported
to 2.4.4).
- FIX: Fixed wrong assertion in UART driver (bug 3600789)(backported
to 2.4.4).
- FIX: Fixed small bug in shell argument parsing code in shell_thread (bug
3599328)(backported to 2.4.4).
- FIX: Fixed wrong condition in checksum offload of STM32 MAC driver (bug