Skip to content

Commit 8a2651a

Browse files
committed
Add sdioio reset to port startup
1 parent 83f9f77 commit 8a2651a

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

ports/espressif/common-hal/sdioio/SDCard.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,9 @@ void sdioio_reset() {
251251
slot_in_use[i] = false;
252252
}
253253
}
254-
255-
// don't we have to deinit any currently used slots here?
254+
if (!slot_in_use[0] && !slot_in_use[1]) {
255+
sdmmc_host_deinit();
256+
}
256257

257258
return;
258259
}

ports/espressif/supervisor/port.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
#include "shared-bindings/socketpool/__init__.h"
4141
#include "shared-module/os/__init__.h"
4242

43+
#if CIRCUITPY_SDIOIO
44+
#include "common-hal/sdioio/SDCard.h"
45+
#endif
46+
4347
#if CIRCUITPY_TOUCHIO_USE_NATIVE
4448
#include "peripherals/touch.h"
4549
#endif
@@ -348,6 +352,10 @@ void reset_port(void) {
348352
uart_reset();
349353
#endif
350354

355+
#if CIRCUITPY_SDIOIO
356+
sdioio_reset();
357+
#endif
358+
351359
#if CIRCUITPY_DUALBANK
352360
dualbank_reset();
353361
#endif

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy