Storage Namespace Reference

Classes

class  CustomDevice
 Class to support dynamic partitions. More...
 
class  Device
 Represents a storage device (e.g. flash memory) More...
 
struct  esp_partition_info_t
 Internal structure describing the binary layout of a partition table entry. More...
 
class  FileDevice
 Read-only partition on a stream object. More...
 
class  Iterator
 
class  Partition
 Represents a flash partition. 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...
 

Functions

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...
 
DevicefindDevice (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 >
Iterator findPartition (T subType)
 
template<typename T >
Storage::Partition findDefaultPartition (T subType)
 

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
 
SpiFlashspiFlash
 
SysMem sysMem
 

Detailed Description

FileDevice.h

Copyright 2019 mikee47 mike@.nosp@m.sill.nosp@m.yhous.nosp@m.e.ne.nosp@m.t

This file is part of the IFS Library

This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 or later.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this library. If not, see https://www.gnu.org/licenses/.

Function Documentation

◆ findDefaultPartition()

template<typename T >
Storage::Partition Storage::findDefaultPartition ( subType)

◆ findDevice()

Device* Storage::findDevice ( const String name)

Find a registered device.

◆ findPartition() [1/3]

Partition Storage::findPartition ( const String name)

Find the first partition matching the given name.

◆ findPartition() [2/3]

Iterator Storage::findPartition ( Partition::Type  type = Partition::Type::any,
uint8_t  subType = Partition::SubType::any 
)
inline

Find partitions of the given type.

◆ findPartition() [3/3]

template<typename T >
Iterator Storage::findPartition ( subType)

◆ getDevices()

const Device::List Storage::getDevices ( )

Get read-only reference to device list.

◆ initialize()

void Storage::initialize ( )

Called early in the startup phase.

◆ registerDevice()

bool Storage::registerDevice ( Device device)

Register a storage device.

Return values
booltrue 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 uint16_t Storage::ESP_PARTITION_MAGIC {0x50AA}

Identifies a valid partition.

◆ ESP_PARTITION_MAGIC_MD5

constexpr uint16_t Storage::ESP_PARTITION_MAGIC_MD5 {0xEBEB}

Identifies an MD5 hash block.

◆ ESP_PARTITION_TABLE_MAX_LEN

constexpr size_t Storage::ESP_PARTITION_TABLE_MAX_LEN {0xC00}

◆ progMem

ProgMem Storage::progMem

◆ spiFlash

SpiFlash* Storage::spiFlash

◆ sysMem

SysMem Storage::sysMem