/* Reset the Tx and Rx FIFO of smartcard module.  */
void SC_ClearFIFO(SC_T *sc)
/* Reset the Tx and Rx FIFO of smartcard module.  */
void SC_ClearFIFO(SC_T *sc)
{
    while((sc->ALTCTL & SC_ALTCTL_SYNC_Msk) == SC_ALTCTL_SYNC_Msk) {}
    sc->ALTCTL |= (SC_ALTCTL_TXRST_Msk | SC_ALTCTL_RXRST_Msk);
}