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


/***************************************************************************
* Function Name     : ReadUART1                                            *
* Description       : This function returns the contents of UxRXREG buffer * 
* Parameters        : None                                                 *
* Return Value      : unsigned int value from UxRXREG receive buffer       *
***************************************************************************/
#ifdef _UART_IRDA_V1_1

unsigned int ReadUART1(void)
{
    if(U1MODEbits.PDSEL == 3)
        return (U1RXREG);
    else
        return (U1RXREG & 0xFF);
}

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