/* Enable or disable inverting serial input function of IrDA on UART peripheral.  */
void UART_IrDAInvtInputCmd(LPC_UART_TypeDef *UARTx, FunctionalState NewState)
/* Enable or disable inverting serial input function of IrDA on UART peripheral.  */
void UART_IrDAInvtInputCmd(LPC_UART_TypeDef *UARTx, FunctionalState NewState)
{
    if (NewState == ENABLE)
    {
        UARTx->ICR |= UART_ICR_IRDAINV;
    }
    else if (NewState == DISABLE)
    {
        UARTx->ICR &= (~UART_ICR_IRDAINV) & UART_ICR_BITMASK;
    }
}