11#include < WiFi.h>
22#include < WiFiClient.h>
33#include < WebServer.h>
4- #include < SD_MMC .h>
4+ #include < SD .h>
55
66#include < uri/UriRegex.h>
77
@@ -20,10 +20,10 @@ void handleCreateProcess() {
2020 String path = server.pathArg (0 );
2121 HTTPRaw& raw = server.raw ();
2222 if (raw.status == RAW_START) {
23- if (SD_MMC .exists ((char *)path.c_str ())) {
24- SD_MMC .remove ((char *)path.c_str ());
23+ if (SD .exists ((char *)path.c_str ())) {
24+ SD .remove ((char *)path.c_str ());
2525 }
26- rawFile = SD_MMC .open (path.c_str (), FILE_WRITE);
26+ rawFile = SD .open (path.c_str (), FILE_WRITE);
2727 Serial.print (" Upload: START, filename: " );
2828 Serial.println (path);
2929 } else if (raw.status == RAW_WRITE) {
@@ -50,10 +50,10 @@ void printDirectory() {
5050 return returnFail (" BAD ARGS" );
5151 }
5252 String path = server.arg (" dir" );
53- if (path != " /" && !SD_MMC .exists ((char *)path.c_str ())) {
53+ if (path != " /" && !SD .exists ((char *)path.c_str ())) {
5454 return returnFail (" BAD PATH" );
5555 }
56- File dir = SD_MMC .open ((char *)path.c_str ());
56+ File dir = SD .open ((char *)path.c_str ());
5757 path = String ();
5858 if (!dir.isDirectory ()) {
5959 dir.close ();
@@ -107,8 +107,8 @@ void handleNotFound() {
107107void setup (void ) {
108108 Serial.begin (115200 );
109109
110- while (!SD_MMC .begin ()) delay (10 );
111- Serial.println (" SD_MMC Card initialized." );
110+ while (!SD .begin ()) delay (10 );
111+ Serial.println (" SD Card initialized." );
112112
113113 WiFi.mode (WIFI_STA);
114114 WiFi.begin (ssid, password);
0 commit comments