#if defined(__PIC24F__)
#include <p24Fxxxx.h>
#endif
#include "uart.h"


/* UART2 is defined in following devices */
#ifdef _UART_IRDA_V1_2

/*********************************************************************
* Function Name     : DataRdyUart2                                   *
* Description       : This function checks whether there is any data *
*                     that can be read from the input buffer, by     *
*                     checking URXDA bit                             *
* Parameters        : None                                           *
* Return Value      : char if any data available in buffer           *
*********************************************************************/

char DataRdyUART2(void)
{
    return(U2STAbits.URXDA);
}

#else
#warning "Does not build on this target"
#endif
