/* This function reset both transmit and receive FIFO of specified smartcard module.  */
void SC_ClearFIFO(SC_T *sc)
/* This function reset both transmit and receive FIFO of specified smartcard module.  */
void SC_ClearFIFO(SC_T *sc)
{
    while (sc->ALTCTL & SC_ALTCTL_SYNC_Msk)
    {
        ;
    }
    sc->ALTCTL |= (SC_ALTCTL_TXRST_Msk | SC_ALTCTL_RXRST_Msk);
}