StreamDevice.h
Go to the documentation of this file.
17 StreamDevice(IDataSourceStream* stream, size_t size) : Device(nameOf(stream), size), mStream(stream)
Type getType() const override
Obtain device type.
Definition: StreamDevice.h:37
static String nameOf(IDataSourceStream *stream)
Definition: StreamDevice.h:25
Type
Storage type.
Definition: Components/Storage/src/include/Storage/Device.h:42
bool read(storage_size_t address, void *buffer, size_t len) override
Read data from the storage device.
Definition: StreamDevice.h:42
Definition: FileDevice.h:25
virtual String getName() const
Returns name of the resource.
Definition: DataSourceStream.h:156
StreamDevice(IDataSourceStream *stream)
Definition: StreamDevice.h:21
Represents a storage device (e.g. flash memory)
Definition: Components/Storage/src/include/Storage/Device.h:33
StreamDevice(IDataSourceStream *stream, size_t size)
Definition: StreamDevice.h:17
#define F(string_literal)
Wrap a string literal stored in flash and access it using a String object.
Definition: WString.h:113
bool erase_range(storage_size_t address, storage_size_t len) override
Erase a region of storage in preparation for writing.
Definition: StreamDevice.h:58
bool write(storage_size_t address, const void *data, size_t len) override
Write data to the storage device.
Definition: StreamDevice.h:53