CODE Loop back 10 bytes of data using interrupts

Table 1. CODE UART Code example
Loop back 10 bytes of data using interrupts.
LPC_USART->CFG = UART_CFG_DATALEN(8)| UART_CFG_ENABLE;
LPC_USART->INTENSET = UART_STAT_TXRDY | UART_STAT_RXRDY;
while(tx_counter < 10);
LPC_USART->INTENCLR = UART_STAT_TXRDY | UART_STAT_RXRDY;
while(~LPC_USART->STAT & UART_STAT_TXIDLE);
NVIC_DisableIRQ(Usart_IRQn);

-->