Storage::CustomDevice Class Reference
Class to support dynamic partitions. More...
#include <CustomDevice.h>
Inheritance diagram for Storage::CustomDevice:
Collaboration diagram for Storage::CustomDevice:
Public Member Functions | |
Partition | createPartition (const Partition::Info &info) |
Partition | createPartition (const String &name, Partition::Type type, uint8_t subtype, uint32_t offset, size_t size, Partition::Flags flags=0) |
template<typename SubType > | |
Partition | createPartition (const String &name, SubType subtype, uint32_t offset, size_t size, Partition::Flags flags=0) |
![]() | |
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... | |
virtual String | getName () const =0 |
Obtain unique device name. More... | |
virtual uint32_t | getId () const |
Obtain device ID. More... | |
virtual size_t | getBlockSize () const =0 |
Obtain smallest allocation unit for erase operations. More... | |
virtual size_t | getSize () const =0 |
Obtain addressable size of this device. More... | |
virtual Type | getType () const =0 |
Obtain device type. More... | |
virtual bool | read (uint32_t address, void *dst, size_t size)=0 |
Read data from the storage device. More... | |
virtual bool | write (uint32_t address, const void *src, size_t size)=0 |
Write data to the storage device. More... | |
virtual bool | erase_range (uint32_t address, size_t size)=0 |
Erase a region of storage in preparation for writing. More... | |
![]() | |
Device * | getNext () const |
Iterator | begin () const |
Iterator | end () const |
Iterator | cbegin () const |
Iterator | cend () const |
![]() | |
virtual | ~LinkedObject () |
virtual LinkedObject * | next () const |
LinkedObject * | getNext () const |
bool | operator== (const LinkedObject &other) const |
bool | operator!= (const LinkedObject &other) const |
Additional Inherited Members | |
![]() | |
enum | Type : uint8_t { Type::XX } |
Storage type. More... | |
using | List = LinkedObjectListTemplate< Device > |
using | OwnedList = OwnedLinkedObjectListTemplate< Device > |
![]() | |
using | Iterator = IteratorTemplate< Device, Device *, Device &> |
using | ConstIterator = IteratorTemplate< const Device, const Device *, const Device &> |
![]() | |
PartitionTable | mPartitions |
Detailed Description
Class to support dynamic partitions.
Call createPartition
to add partitions up to a maximum of 16 entries.
Member Function Documentation
◆ createPartition() [1/3]
Partition Storage::CustomDevice::createPartition | ( | const Partition::Info & | info | ) |
◆ createPartition() [2/3]
|
inline |
◆ createPartition() [3/3]
template<typename SubType >
|
inline |
The documentation for this class was generated from the following file: