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