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

View File

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