From 341c4b534347301733c97c6cf95198bc072d9491 Mon Sep 17 00:00:00 2001 From: Daniel Plasa Date: Sun, 31 May 2020 18:38:42 +0200 Subject: add docu on esp32 --- examples/FTPServerSample/LittleFSSample/LittleFSSample.ino | 3 ++- examples/FTPServerSample/SPIFFSSample/SPIFFSSample.ino | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'examples/FTPServerSample') diff --git a/examples/FTPServerSample/LittleFSSample/LittleFSSample.ino b/examples/FTPServerSample/LittleFSSample/LittleFSSample.ino index d30120b..4a02754 100644 --- a/examples/FTPServerSample/LittleFSSample/LittleFSSample.ino +++ b/examples/FTPServerSample/LittleFSSample/LittleFSSample.ino @@ -22,6 +22,7 @@ #include #include #include +#define BAUDRATE 74880 const char *ssid PROGMEM = "YOUR_SSID"; const char *password PROGMEM = "YOUR_PASS"; @@ -31,7 +32,7 @@ FTPServer ftpSrv(LittleFS); void setup(void) { - Serial.begin(74880); + Serial.begin(BAUDRATE); WiFi.begin(ssid, password); bool fsok = LittleFS.begin(); diff --git a/examples/FTPServerSample/SPIFFSSample/SPIFFSSample.ino b/examples/FTPServerSample/SPIFFSSample/SPIFFSSample.ino index b15bd98..23bce4a 100644 --- a/examples/FTPServerSample/SPIFFSSample/SPIFFSSample.ino +++ b/examples/FTPServerSample/SPIFFSSample/SPIFFSSample.ino @@ -18,9 +18,11 @@ #if (defined ESP32) #include #include +#define BAUDRATE 115200 #elif (defined ESP8266) #include #include +#define BAUDRATE 74880 #endif #include @@ -34,7 +36,7 @@ FTPServer ftpSrv(SPIFFS); void setup(void) { - Serial.begin(74880); + Serial.begin(BAUDRATE); WiFi.begin(ssid, password); bool fsok = SPIFFS.begin(); @@ -72,7 +74,7 @@ void loop(void) ftpSrv.handleFTP(); // - // Code below just to debug in Serial Monitor + // Code below just for debugging in Serial Monitor // if (action == show) { @@ -112,7 +114,7 @@ void loop(void) uint16_t ListDir(const char *path) { uint16_t dirCount = 0; - Dir dir = SPIFFS.openDir(path); + Dir dir = SPIFFS.openDir(path, "r"); while (dir.next()) { ++dirCount; -- cgit v1.2.3