/* brief reset the different block of the interface. param base SDIF peripheral base address. param mask indicate which block to reset. param timeout value,set to wait the bit self clear return reset result.  */
bool SDIF_Reset(SDIF_Type *base, uint32_t mask, uint32_t timeout)
/* brief reset the different block of the interface. param base SDIF peripheral base address. param mask indicate which block to reset. param timeout value,set to wait the bit self clear return reset result.  */
bool SDIF_Reset(SDIF_Type *base, uint32_t mask, uint32_t timeout)
{
    base->CTRL |= mask;
    if (IS_SDIF_FLAG_SET(mask, kSDIF_ResetDMAInterface))
    {
        base->BMOD = (base->BMOD & (~SDIF_BMOD_DE_MASK)) | SDIF_BMOD_SWR_MASK;
    }
    while ((base->CTRL & mask) != 0UL)
    {
        if (0UL == timeout)
        {
            break;
        }
        timeout--;
    }
    return timeout != 0UL ? true : false;
}