/*---------------------------------------------------------------------------------------------------------*/
/* UART Test Sample */
/* Test Item */
/* It sends the received data to HyperTerminal. */
/*---------------------------------------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------------------------------------*/
/* MAIN function */
/*---------------------------------------------------------------------------------------------------------*/
int main(void)
{
/* Init System, IP clock and multi-function I/O */
SYS_Init();
/* Init UART0 for printf */
UART0_Init();
/* Init UART1 for testing */
if(u32IntSts & UART_ISR_RDA_INT_Msk)
{
/* Get all the input characters */
while(_UART_IS_RX_READY(UART0))
{
while(_UART_IS_RX_FULL(UART0))
{
;
}
/* Get the character from UART Buffer */
_UART_RECEIVEBYTE(UART0,u8InChar); /* Rx trigger level is 1 byte*/
_UART_SENDBYTE(UART0,u8InChar);
_UART_WAIT_TX_EMPTY(UART0);
}