Skip to content

Commit 16b2004

Browse files
committed
sd: speedup sd_card_inserted
Don't sleep as long.
1 parent 765b7c5 commit 16b2004

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,8 @@ bool sd_card_inserted(void)
317317
sd_mmc_err_t err = sd_mmc_check(0);
318318
/* If initialization is ongoing, wait up to 1 second for it to initialize */
319319
if (err == SD_MMC_INIT_ONGOING) {
320-
for (int i = 0; i < 10; ++i) {
321-
delay_ms(100);
320+
for (int i = 0; i < 200; ++i) {
321+
delay_ms(5);
322322
err = sd_mmc_check(0);
323323
if (err != SD_MMC_INIT_ONGOING) {
324324
break;

0 commit comments

Comments
 (0)