diff --git a/tasmota/tasmota_support/support_tasmota.ino b/tasmota/tasmota_support/support_tasmota.ino index 0c37a5eb0..113181ce0 100644 --- a/tasmota/tasmota_support/support_tasmota.ino +++ b/tasmota/tasmota_support/support_tasmota.ino @@ -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 diff --git a/tasmota/tasmota_xdrv_driver/xdrv_50_filesystem.ino b/tasmota/tasmota_xdrv_driver/xdrv_50_filesystem.ino index e61a22535..d3d0acbd7 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_50_filesystem.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_50_filesystem.ino @@ -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);