Move SD card init up

Move SD card init up (#18934)
This commit is contained in:
Theo Arends 2023-07-01 12:48:33 +02:00
parent 2705374160
commit 3edb5bb096
2 changed files with 9 additions and 0 deletions

View File

@ -2261,6 +2261,12 @@ void GpioInit(void)
}
}
#ifdef USE_UFILESYS
#ifdef USE_SDCARD
UfsCheckSDCardInit();
#endif // USE_SDCARD
#endif // USE_UFILESYS
XdrvCall(FUNC_SETUP_RING1); // Setup RTC hardware
XsnsXdrvCall(FUNC_SETUP_RING2); // Setup hardware supporting virtual switches/buttons/relays

View File

@ -1138,11 +1138,14 @@ bool Xdrv50(uint32_t function) {
case FUNC_LOOP:
UfsExecuteCommandFileLoop();
break;
/*
// Moved to support_tasmota.ino for earlier init to be used by scripter
#ifdef USE_SDCARD
case FUNC_PRE_INIT:
UfsCheckSDCardInit();
break;
#endif // USE_SDCARD
*/
case FUNC_MQTT_INIT:
if (!TasmotaGlobal.no_autoexec) {
UfsExecuteCommandFile(TASM_FILE_AUTOEXEC);