FileDevice.h
Go to the documentation of this file.
size_t getSize() const override
Obtain addressable size of this device.
Definition: FileDevice.h:58
bool erase_range(uint32_t address, size_t len) override
Erase a region of storage in preparation for writing.
static constexpr FileSystem & cast(IFileSystem &fs)
Definition: Components/IFS/src/include/IFS/FileSystem.h:42
FileDevice(const String &name, IFS::IFileSystem &fileSys, IFS::FileHandle file, size_t size)
Definition: FileDevice.h:32
FileDevice(const String &name, IFS::IFileSystem &fileSys, IFS::FileHandle file)
Definition: FileDevice.h:37
Type
Storage type.
Definition: Components/Storage/src/include/Storage/Device.h:41
Type getType() const override
Obtain device type.
Definition: FileDevice.h:53
Class to manage a NUL-terminated C-style string When storing persistent strings in RAM the regular St...
Definition: CString.h:26
size_t getBlockSize() const override
Obtain smallest allocation unit for erase operations.
Definition: FileDevice.h:63
bool write(uint32_t address, const void *data, size_t len) override
Write data to the storage device.
String getName() const override
Obtain unique device name.
Definition: FileDevice.h:48
bool read(uint32_t address, void *buffer, size_t len) override
Read data from the storage device.
Definition: FileDevice.h:23