Equalize hekate main and Nyx sd based functions

This commit is contained in:
CTCaer
2020-06-13 18:32:40 +03:00
parent 7dd3178d48
commit 21548545fc
29 changed files with 167 additions and 103 deletions

View File

@@ -187,6 +187,8 @@ reinit_try:
else
retries--;
sd_error_count_increment(SD_ERROR_RW_RETRY);
msleep(50);
} while (retries);
@@ -194,10 +196,17 @@ reinit_try:
if (storage->sdmmc->id == SDMMC_1)
{
int res;
sd_error_count_increment(SD_ERROR_RW_FAIL);
if (!first_reinit)
res = sd_initialize(true);
else
{
res = sd_init_retry(true);
if (!res)
sd_error_count_increment(SD_ERROR_INIT_FAIL);
}
retries = 3;
first_reinit = true;