/* param base SPDIF base pointer param enable True means enable SPDIF Tx, false means disable.  */
void SPDIF_TxEnable(SPDIF_Type *base, bool enable)
/* param base SPDIF base pointer param enable True means enable SPDIF Tx, false means disable.  */
void SPDIF_TxEnable(SPDIF_Type *base, bool enable)
{
    uint32_t val = 0;
    if (enable)
    {
        val = base->SCR & (~SPDIF_SCR_TXFIFO_CTRL_MASK);
        val |= SPDIF_SCR_TXFIFO_CTRL(1U);
        base->SCR = val;
        base->STC |= SPDIF_STC_TX_ALL_CLK_EN_MASK;
    }
    else
    {
        base->SCR &= ~(SPDIF_SCR_TXFIFO_CTRL_MASK | SPDIF_SCR_TXSEL_MASK);
        base->STC &= ~SPDIF_STC_TX_ALL_CLK_EN_MASK;
    }
}