Storage::SpiFlash Class Reference
Main flash storage device. More...
#include <SpiFlash.h>
Inheritance diagram for Storage::SpiFlash:
Collaboration diagram for Storage::SpiFlash:
Public Member Functions | |
| String | getName () const override |
| Obtain unique device name. More... | |
| size_t | getBlockSize () const override |
| Obtain smallest allocation unit for erase operations. More... | |
| size_t | getSize () const override |
| Obtain addressable size of this device. More... | |
| Type | getType () const override |
| Obtain device type. More... | |
| uint32_t | getId () const override |
| Obtain device ID. More... | |
| bool | read (uint32_t address, void *dst, size_t size) override |
| Read data from the storage device. More... | |
| bool | write (uint32_t address, const void *src, size_t size) override |
| Write data to the storage device. More... | |
| bool | erase_range (uint32_t address, size_t size) override |
| Erase a region of storage in preparation for writing. More... | |
Public Member Functions inherited from Storage::Device | |
| Device () | |
| ~Device () | |
| bool | operator== (const String &name) const |
| PartitionTable & | partitions () |
| const PartitionTable & | partitions () const |
| bool | loadPartitions (uint32_t tableOffset) |
| Load partition table entries Location of partition table to read. More... | |
| bool | loadPartitions (Device &source, uint32_t tableOffset) |
| Load partition table entries from another table. More... | |
Public Member Functions inherited from LinkedObjectTemplate< Device > | |
| Device * | getNext () const |
| Iterator | begin () const |
| Iterator | end () const |
| Iterator | cbegin () const |
| Iterator | cend () const |
Public Member Functions inherited from LinkedObject | |
| virtual | ~LinkedObject () |
| virtual LinkedObject * | next () const |
| LinkedObject * | getNext () const |
| bool | operator== (const LinkedObject &other) const |
| bool | operator!= (const LinkedObject &other) const |
Additional Inherited Members | |
Public Types inherited from Storage::Device | |
| enum | Type : uint8_t { Type::XX } |
| Storage type. More... | |
| using | List = LinkedObjectListTemplate< Device > |
| using | OwnedList = OwnedLinkedObjectListTemplate< Device > |
Public Types inherited from LinkedObjectTemplate< Device > | |
| using | Iterator = IteratorTemplate< Device, Device *, Device &> |
| using | ConstIterator = IteratorTemplate< const Device, const Device *, const Device &> |
Protected Attributes inherited from Storage::Device | |
| PartitionTable | mPartitions |
Detailed Description
Main flash storage device.
Member Function Documentation
◆ erase_range()
|
overridevirtual |
Erase a region of storage in preparation for writing.
- Parameters
-
address Where to start erasing size Size of region to erase, in bytes
- Return values
-
bool true on success, false on error
Implements Storage::Device.
◆ getBlockSize()
|
overridevirtual |
Obtain smallest allocation unit for erase operations.
Implements Storage::Device.
◆ getId()
|
overridevirtual |
◆ getName()
|
overridevirtual |
Obtain unique device name.
Implements Storage::Device.
◆ getSize()
|
overridevirtual |
Obtain addressable size of this device.
- Return values
-
size_t Must be at least as large as the value declared in the partition table
Implements Storage::Device.
◆ getType()
|
inlineoverridevirtual |
Obtain device type.
Implements Storage::Device.
◆ read()
|
overridevirtual |
Read data from the storage device.
- Parameters
-
address Where to start reading dst Buffer to store data size Size of data to be read, in bytes.
- Return values
-
bool true on success, false on error
Implements Storage::Device.
◆ write()
|
overridevirtual |
Write data to the storage device.
- Parameters
-
address Where to start writing src Data to write size Size of data to be written, in bytes.
- Return values
-
bool true on success, false on error
Implements Storage::Device.
The documentation for this class was generated from the following file:
Public Member Functions inherited from
1.8.13