/* Enables ISO7816 smart card mode on the specified UART. */
void UARTSmartCardEnable(uint32_t ui32Base)
/* Enables ISO7816 smart card mode on the specified UART. */
void UARTSmartCardEnable(uint32_t ui32Base)
{
    uint32_t ui32Val;
    ASSERT(_UARTBaseValid(ui32Base));
    ui32Val = HWREG(ui32Base + UART_O_LCRH);
    ui32Val &= ~(UART_LCRH_SPS | UART_LCRH_EPS | UART_LCRH_PEN |
                 UART_LCRH_WLEN_M);
    ui32Val |= UART_LCRH_WLEN_8 | UART_LCRH_PEN | UART_LCRH_EPS |
               UART_LCRH_STP2;
    HWREG(ui32Base + UART_O_LCRH) = ui32Val;
    HWREG(ui32Base + UART_O_CTL) |= UART_CTL_SMART;
}