Partition.h
Go to the documentation of this file.
133 uint32_t offset{0};
143 Info(const String& name, Type type, uint8_t subtype, uint32_t offset, uint32_t size, Flags flags)
207 template <typename T> typename std::enable_if<std::is_pod<T>::value, bool>::type read(size_t offset, T& value)
380 template <typename E> typename std::enable_if<bool(E::partitionType), String>::type toString(E subType)
385 template <typename E> typename std::enable_if<bool(E::partitionType), String>::type toLongString(E subType)
uint32_t lastAddress() const
Obtain address of last byte in this this partition.
Definition: Partition.h:260
bool contains(uint32_t addr) const
Determine if given address contained within this partition.
Definition: Partition.h:341
std::enable_if< std::is_pod< T >::value, bool >::type read(size_t offset, T &value)
Definition: Partition.h:207
Info(const String &name, Type type, uint8_t subtype, uint32_t offset, uint32_t size, Flags flags)
Definition: Partition.h:143
bool isEncrypted() const
Check state of partition encrypted flag.
Definition: Partition.h:293
bool isReadOnly() const
Check state of partition readOnly flag.
Definition: Partition.h:301
uint32_t address() const
Obtain partition starting address.
Definition: Partition.h:251
bool getDeviceAddress(uint32_t &address, size_t size) const
Get corresponding storage device address for a given partition offset.
uint8_t subType() const
Obtain partition sub-type.
Definition: Partition.h:242
bool verify(Type type, uint8_t subtype) const
Write/erase prohibited.
String getDeviceName() const
Get name of storage device for this partition.
bool write(size_t offset, const void *src, size_t size)
Write data to the partition.
size_t getBlockSize() const
Obtain smallest allocation unit for erase operations.
bool operator==(const Partition &other) const
Definition: Partition.h:346
Partition::Type type() const
Obtain partition type.
Definition: Partition.h:234
Class to manage a NUL-terminated C-style string When storing persistent strings in RAM the regular St...
Definition: CString.h:26
String toString(Storage::Partition::Type type, uint8_t subType)
Device * getDevice() const
Get storage device containing this partition.
Definition: Partition.h:333
Represents a storage device (e.g. flash memory)
Definition: Components/Storage/src/include/Storage/Device.h:32
String toLongString(Storage::Partition::Type type, uint8_t subType)
String typeString() const
bool verify(uint8_t type, uint8_t subtype) const
Definition: Partition.h:171
Internal structure describing the binary layout of a partition table entry.
Definition: partition.h:16
String longTypeString() const
static SubType::App apptypeOta(uint8_t i)
Convenience function to get SubType value for the i-th OTA partition.
Definition: Partition.h:186
bool read(size_t offset, void *dst, size_t size)
Read data from the partition.
Definition: FileDevice.h:23
bool erase_range(size_t offset, size_t size)
Erase part of the partition.
Definition: Partition.h:90
1.8.13