/* UART receive/transmit interrupt handler for ring buffers */ void Chip_UART_IRQRBHandler(LPC_USART_T *pUART, RINGBUFF_T *pRXRB, RINGBUFF_T *pTXRB) { /* Handle transmit interrupt if enabled */ if ((Chip_UART_GetStatus(pUART) & UART_STAT_TXRDY) != 0) { Chip_UART_TXIntHandlerRB(pUART, pTXRB); /* Disable transmit interrupt if the ring buffer is empty */ if (RingBuffer_IsEmpty(pTXRB)) { Chip_UART_IntDisable(pUART, UART_INTEN_TXRDY); } } /* Handle receive interrupt */ Chip_UART_RXIntHandlerRB(pUART, pRXRB); } |
/* UART receive/transmit interrupt handler for ring buffers */ void Chip_UART_IRQRBHandler(LPC_USART_T *pUART, RINGBUFF_T *pRXRB, RINGBUFF_T *pTXRB) { /* Handle transmit interrupt if enabled */ [color=#f00]if ((Chip_UART_GetIntsEnabled(pUART) & UART_INTEN_TXRDY) != 0) {[/color] if ((Chip_UART_GetStatus(pUART) & UART_STAT_TXRDY) != 0) { Chip_UART_TXIntHandlerRB(pUART, pTXRB); /* Disable transmit interrupt if the ring buffer is empty */ if (RingBuffer_IsEmpty(pTXRB)) { Chip_UART_IntDisable(pUART, UART_INTEN_TXRDY); } } [color=#f00]}[/color] /* Handle receive interrupt */ Chip_UART_RXIntHandlerRB(pUART, pRXRB); } |
Thanks for posting this alexgoldstone... I had been unknowingly plagued by this bug but didn't manage to catch it happening till I found your thread...