build: clean up the mess of ifdefs from platform into a scons-configured hal
This commit is contained in:
@@ -6,10 +6,10 @@ filename_iterator::filename_iterator()
|
||||
{}
|
||||
|
||||
filename_iterator::filename_iterator(const char* path, const char* suffix)
|
||||
#ifdef BOARD_ESP8266
|
||||
#ifdef ESP8266
|
||||
: dir(LittleFS.openDir(path)),
|
||||
#endif
|
||||
#ifdef BOARD_ESP32
|
||||
#ifdef ESP32
|
||||
: dir(LittleFS.open(path)),
|
||||
#endif
|
||||
valid(true),
|
||||
@@ -26,7 +26,7 @@ filename_iterator::next()
|
||||
}
|
||||
int extPos = -1;
|
||||
do {
|
||||
#ifdef BOARD_ESP8266
|
||||
#ifdef ESP8266
|
||||
valid = dir.next();
|
||||
if (valid) {
|
||||
String fname = dir.fileName();
|
||||
@@ -36,7 +36,7 @@ filename_iterator::next()
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef BOARD_ESP32
|
||||
#ifdef ESP32
|
||||
File next = dir.openNextFile();
|
||||
valid = (bool)next;
|
||||
if (valid && !next.isDirectory()) {
|
||||
|
||||
Reference in New Issue
Block a user