Add isSdUsed() query for third party

This commit is contained in:
Luc
2022-04-20 18:00:54 +08:00
parent 98ea169b86
commit 67ce53cd2d
4 changed files with 22 additions and 7 deletions

View File

@@ -31,6 +31,9 @@
#include "core/esp3doutput.h"
#include "core/commands.h"
#include <soc/rtc_wdt.h>
#ifdef SDSUPPORT
#include "modules/filesystem/esp_sd.h"
#endif //SDSUPPORT
Esp3DLib esp3dlib;
@@ -75,6 +78,16 @@ bool Esp3DLib::parse(char * cmd)
return false;
}
bool Esp3DLib::isSdUsed()
{
#ifdef SDSUPPORT
return ESP_SD::isEnabled();
#else
return false;
#endif //SDSUPPORT
}
//Idletask when setup is done
void Esp3DLib::idletask()
{