StreamDevice.h
Go to the documentation of this file.
22 StreamDevice(IDataSourceStream* stream, size_t size) : Device(nameOf(stream), size), mStream(stream)
#define F(string_literal)
Wrap a string literal stored in flash and access it using a String object.
Definition: WString.h:109
virtual String getName() const
Returns name of the resource.
Definition: DataSourceStream.h:158
Represents a storage device (e.g. flash memory)
Definition: Components/Storage/src/include/Storage/Device.h:34
Type
Storage type.
Definition: Components/Storage/src/include/Storage/Device.h:42
bool erase_range(storage_size_t address, storage_size_t len) override
Erase a region of storage in preparation for writing.
Definition: StreamDevice.h:67
static String nameOf(IDataSourceStream *stream)
Definition: StreamDevice.h:34
StreamDevice(IDataSourceStream *stream)
Create a Device object using data from a stream with all available data.
Definition: StreamDevice.h:30
StreamDevice(IDataSourceStream *stream, size_t size)
Create a Device object using data from a stream with restricted size.
Definition: StreamDevice.h:22
bool write(storage_size_t address, const void *data, size_t len) override
Write data to the storage device.
Definition: StreamDevice.h:62
bool read(storage_size_t address, void *buffer, size_t len) override
Read data from the storage device.
Definition: StreamDevice.h:51
Type getType() const override
Obtain device type.
Definition: StreamDevice.h:46
Definition: FileDevice.h:26
1.9.1