/* Enables ISO7816 smart card mode on the specified UART. */
void UARTSmartCardEnable(unsigned long ulBase)
/* Enables ISO7816 smart card mode on the specified UART. */
void UARTSmartCardEnable(unsigned long ulBase)
{
    unsigned long ulVal;
    ASSERT(!CLASS_IS_SANDSTORM && !CLASS_IS_FURY && !CLASS_IS_DUSTDEVIL);
    ASSERT(UARTBaseValid(ulBase));
    ulVal = HWREG(ulBase + UART_O_LCRH);
    ulVal &= ~(UART_LCRH_SPS | UART_LCRH_EPS | UART_LCRH_PEN |
               UART_LCRH_WLEN_M);
    ulVal |= UART_LCRH_WLEN_8 | UART_LCRH_PEN | UART_LCRH_EPS | UART_LCRH_STP2;
    HWREG(ulBase + UART_O_LCRH) = ulVal;
    HWREG(ulBase + UART_O_CTL) |= UART_CTL_SMART;
}