/* Get current value of Line Status register in UART peripheral.  */
uint8_t UART_GetLineStatus(LPC_UART_TypeDef *UARTx)
/* Get current value of Line Status register in UART peripheral.  */
uint8_t UART_GetLineStatus(LPC_UART_TypeDef *UARTx)
{
    if (((LPC_UART1_TypeDef *)UARTx) == LPC_UART1)
    {
        return ((((LPC_UART1_TypeDef *)LPC_UART1)->LSR) & UART_LSR_BITMASK);
    }
    else
    {
        return ((UARTx->LSR) & UART_LSR_BITMASK);
    }
}