mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-29 05:21:37 +03:00
Resolve naming conflicts between FS and SD library
This commit is contained in:
@ -21,6 +21,8 @@
|
||||
#include "FS.h"
|
||||
#include "FSImpl.h"
|
||||
|
||||
using namespace fs;
|
||||
|
||||
static bool sflags(const char* mode, OpenMode& om, AccessMode& am);
|
||||
|
||||
size_t File::write(uint8_t c) {
|
||||
|
@ -24,6 +24,8 @@
|
||||
#include <Arduino.h>
|
||||
#include <memory>
|
||||
|
||||
namespace fs {
|
||||
|
||||
class File;
|
||||
class Dir;
|
||||
|
||||
@ -106,6 +108,12 @@ protected:
|
||||
|
||||
};
|
||||
|
||||
} // namespace fs
|
||||
|
||||
using fs::FS;
|
||||
using fs::File;
|
||||
using fs::Dir;
|
||||
|
||||
extern FS SPIFFS;
|
||||
|
||||
#endif //FS_H
|
||||
|
@ -23,6 +23,8 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
namespace fs {
|
||||
|
||||
class FileImpl {
|
||||
public:
|
||||
virtual ~FileImpl() { }
|
||||
@ -67,5 +69,6 @@ public:
|
||||
|
||||
};
|
||||
|
||||
} // namespace fs
|
||||
|
||||
#endif //FSIMPL_H
|
||||
|
@ -32,6 +32,8 @@ extern "C" {
|
||||
#include "spi_flash.h"
|
||||
}
|
||||
|
||||
using namespace fs;
|
||||
|
||||
extern int32_t spiffs_hal_write(uint32_t addr, uint32_t size, uint8_t *src);
|
||||
extern int32_t spiffs_hal_erase(uint32_t addr, uint32_t size);
|
||||
extern int32_t spiffs_hal_read(uint32_t addr, uint32_t size, uint8_t *dst);
|
||||
|
Reference in New Issue
Block a user