/* Configure Modem function. This function configure uart modem.  */
void UARTModemCfg(unsigned long ulBase, unsigned long ulCfg)
/* Configure Modem function. This function configure uart modem.  */
void UARTModemCfg(unsigned long ulBase, unsigned long ulCfg)
{
    unsigned long ulTmpReg = 0;
    xASSERT(ulBase == UART1_BASE);
    xASSERT( (ulCfg & ~(
                       LOOPBACK_MODE_EN  | LOOPBACK_MODE_DIS |
                       AUTO_RTS_EN       | AUTO_RTS_DIS      |
                       AUTO_CTS_EN       | AUTO_CTS_DIS
                       )
             ) == 0);
    ulTmpReg = xHWREG(ulBase + MCR);
    ulTmpReg &= ((~ulCfg) >> 16);
    ulTmpReg |= (ulCfg & 0xFFFF);
    xHWREG(ulBase + MCR) = ulTmpReg;
}