/* Force pin DTR/RTS corresponding to given state (Full modem mode)  */
void UART_FullModemForcePinState(LPC_UART1_TypeDef *UARTx, UART_MODEM_PIN_Type Pin, UART1_SignalState NewState)
/* Force pin DTR/RTS corresponding to given state (Full modem mode)  */
void UART_FullModemForcePinState(LPC_UART1_TypeDef *UARTx, UART_MODEM_PIN_Type Pin, UART1_SignalState NewState)
{
    uint8_t tmp = 0;
    switch (Pin)
    {
        case UART1_MODEM_PIN_DTR:
            tmp = UART1_MCR_DTR_CTRL;
            break;
        case UART1_MODEM_PIN_RTS:
            tmp = UART1_MCR_RTS_CTRL;
            break;
        default:
            break;
    }
    if (NewState == ACTIVE)
    {
        UARTx->MCR |= tmp;
    }
    else
    {
        UARTx->MCR &= (~tmp) & UART1_MCR_BITMASK;
    }
}