Interface for using storage memories/devices (e.g. FLASH or EEPROM).
More...
#include <storage.h>
|
virtual | ~Storage ()=default |
|
virtual void | write (uint32_t address, const uint8_t data[], size_t dataSize)=0 |
| Writes data into the storage. More...
|
|
virtual void | read (uint32_t address, uint8_t buffer[], size_t bufferSize)=0 |
| Reads data from the storage into a given read buffer. More...
|
|
virtual bool | isBusy () const =0 |
| Returns if the storage is busy reading, writing or e.g. erasing. More...
|
|
Interface for using storage memories/devices (e.g. FLASH or EEPROM).
Definition at line 24 of file storage.h.
◆ ~Storage()
virtual semf::app::Storage::~Storage |
( |
| ) |
|
|
virtualdefault |
◆ isBusy()
virtual bool semf::app::Storage::isBusy |
( |
| ) |
const |
|
pure virtual |
Returns if the storage is busy reading, writing or e.g. erasing.
- Returns
true
for busy, otherwise false
.
Implemented in semf::Stm32Flash.
◆ read()
virtual void semf::app::Storage::read |
( |
uint32_t |
address, |
|
|
uint8_t |
buffer[], |
|
|
size_t |
bufferSize |
|
) |
| |
|
pure virtual |
Reads data from the storage into a given read buffer.
-
dataAvailable
signal will be emitted for all data are read.
-
error
signal will be emitted if an error occurred.
- Parameters
-
address | The address from which the data will be read. |
buffer | Pointer at which the read data is stored. |
bufferSize | Size of the data to be read in bytes. |
Implemented in semf::Stm32Flash.
◆ write()
virtual void semf::app::Storage::write |
( |
uint32_t |
address, |
|
|
const uint8_t |
data[], |
|
|
size_t |
dataSize |
|
) |
| |
|
pure virtual |
Writes data into the storage.
-
dataWritten
signal will be emitted for all data are written.
-
error
signal will be emitted if an error occurred.
- Parameters
-
address | The address where the data will be written to. |
data | Pointer to the data to be written. |
dataSize | Size of data to be written in bytes. |
Implemented in semf::Stm32Flash.
◆ dataAvailable
Signal semf::app::Storage::dataAvailable |
The signal is triggered after the data has been read completely.
Definition at line 53 of file storage.h.
◆ dataWritten
Signal semf::app::Storage::dataWritten |
The signal is triggered after the data has been written completely.
Definition at line 54 of file storage.h.
◆ error
The signal is triggered after an error occurred.
Definition at line 55 of file storage.h.