Storage Namespace Reference
Namespaces | |
Debug | |
Disk | |
SD | |
Classes | |
class | FileDevice |
Create custom storage device using backing file. More... | |
class | Device |
Represents a storage device (e.g. flash memory) More... | |
class | Iterator |
class | Partition |
Represents a flash partition. More... | |
struct | esp_partition_info_t |
Internal structure describing the binary layout of a partition table entry. More... | |
class | PartitionStream |
Stream operating directory on a Storage partition. More... | |
class | PartitionTable |
class | ProgMem |
Storage device to access PROGMEM using flash API. More... | |
class | SpiFlash |
Main flash storage device. More... | |
class | StreamDevice |
Read-only partition on a stream object. More... | |
class | SysMem |
Storage device to access system memory, e.g. RAM. More... | |
Enumerations | |
enum class | Mode { ReadOnly , Write , BlockErase } |
Functions | |||||
bool | isSize64 (uint64_t value) | ||||
Determine if a value requires 64-bits to store. More... | |||||
bool | isSize64 (int64_t value) | ||||
Determine if a value requires 64-bits to store. More... | |||||
template<typename T > | |||||
constexpr bool | isLog2 (T value) | ||||
Determine if a value is an exact power of 2. More... | |||||
void | initialize () | ||||
Called early in the startup phase. More... | |||||
const Device::List | getDevices () | ||||
Get read-only reference to device list. More... | |||||
bool | registerDevice (Device *device) | ||||
Register a storage device. More... | |||||
bool | unRegisterDevice (Device *device) | ||||
Unregister a storage device. More... | |||||
Device * | findDevice (const String &name) | ||||
Find a registered device. More... | |||||
Partition | findPartition (const String &name) | ||||
Find the first partition matching the given name. More... | |||||
Iterator | findPartition (Partition::Type type=Partition::Type::any, uint8_t subType=Partition::SubType::any) | ||||
Find partitions of the given type. More... | |||||
template<typename T > | |||||
std::enable_if< std::is_enum< T >::value, Iterator >::type | findPartition (T subType) | ||||
template<typename T > | |||||
Storage::Partition | findDefaultPartition (T subType) | ||||
Get power of 2 for given value | |||||
| |||||
template<typename T > | |||||
constexpr std::enable_if<(sizeof(T)<=4), uint8_t >::type | getSizeBits (T value) | ||||
template<typename T > | |||||
constexpr std::enable_if<(sizeof(T) > 4), uint8_t >::type | getSizeBits (T value) | ||||
Variables | |
constexpr uint16_t | ESP_PARTITION_MAGIC {0x50AA} |
Identifies a valid partition. More... | |
constexpr uint16_t | ESP_PARTITION_MAGIC_MD5 {0xEBEB} |
Identifies an MD5 hash block. More... | |
constexpr size_t | ESP_PARTITION_TABLE_MAX_LEN {0xC00} |
ProgMem | progMem |
SpiFlash * | spiFlash |
SysMem | sysMem |
Enumeration Type Documentation
◆ Mode
|
strong |
Function Documentation
◆ findDefaultPartition()
template<typename T >
Storage::Partition Storage::findDefaultPartition | ( | T | subType | ) |
◆ findDevice()
◆ findPartition() [1/3]
Find the first partition matching the given name.
◆ findPartition() [2/3]
|
inline |
Find partitions of the given type.
◆ findPartition() [3/3]
template<typename T >
std::enable_if<std::is_enum<T>::value, Iterator>::type Storage::findPartition | ( | T | subType | ) |
◆ getDevices()
const Device::List Storage::getDevices | ( | ) |
Get read-only reference to device list.
◆ getSizeBits() [1/2]
template<typename T >
|
constexpr |
◆ getSizeBits() [2/2]
template<typename T >
|
constexpr |
◆ initialize()
void Storage::initialize | ( | ) |
Called early in the startup phase.
◆ isLog2()
template<typename T >
|
constexpr |
Determine if a value is an exact power of 2.
◆ isSize64() [1/2]
|
inline |
Determine if a value requires 64-bits to store.
◆ isSize64() [2/2]
|
inline |
Determine if a value requires 64-bits to store.
◆ registerDevice()
bool Storage::registerDevice | ( | Device * | device | ) |
Register a storage device.
- Return values
-
bool true on success, false if another device already registered with same name
◆ unRegisterDevice()
bool Storage::unRegisterDevice | ( | Device * | device | ) |
Unregister a storage device.
Use extreme care: behaviour is unpredictable if partitions are in use
Variable Documentation
◆ ESP_PARTITION_MAGIC
|
constexpr |
Identifies a valid partition.
◆ ESP_PARTITION_MAGIC_MD5
|
constexpr |
Identifies an MD5 hash block.
◆ ESP_PARTITION_TABLE_MAX_LEN
|
constexpr |
◆ progMem
|
extern |
◆ spiFlash
|
extern |
◆ sysMem
|
extern |