/* param base USDHC peripheral base address. param mask The reset type mask(_usdhc_reset). param timeout Timeout for reset. retval true Reset successfully. retval false Reset failed.  */
bool USDHC_Reset(USDHC_Type *base, uint32_t mask, uint32_t timeout)
/* param base USDHC peripheral base address. param mask The reset type mask(_usdhc_reset). param timeout Timeout for reset. retval true Reset successfully. retval false Reset failed.  */
bool USDHC_Reset(USDHC_Type *base, uint32_t mask, uint32_t timeout)
{
    base->SYS_CTRL |= (mask & (USDHC_SYS_CTRL_RSTA_MASK | USDHC_SYS_CTRL_RSTC_MASK | USDHC_SYS_CTRL_RSTD_MASK));
    while ((base->SYS_CTRL & mask) != 0U)
    {
        if (timeout == 0U)
        {
            break;
        }
        timeout--;
    }
    return ((!timeout) ? false : true);
}