/* Checks for error conditions for no response command.  */
static int32_t SDMMC_GetCmdError(CM_SDIOC_TypeDef *SDIOCx)
/* Checks for error conditions for no response command.  */
static int32_t SDMMC_GetCmdError(CM_SDIOC_TypeDef *SDIOCx)
{
    __IO uint32_t u32Count;
    int32_t i32Ret = LL_OK;
    u32Count = SDMMC_CMD_TIMEOUT * (HCLK_VALUE / 20000UL);
    while (RESET == SDIOC_GetIntStatus(SDIOCx, SDIOC_INT_FLAG_CC)) {
        if (0UL == u32Count) {
            i32Ret = LL_ERR_TIMEOUT;
            break;
        }
        u32Count--;
    }
    if (LL_OK == i32Ret) {
        SDIOC_ClearIntStatus(SDIOCx, SDIOC_INT_STATIC_FLAGS);
    }
    return i32Ret;
}