A memory-mapped partition region.
More...
A memory-mapped partition region.
Provides direct memory access to partition contents. The mapped region is automatically unmapped on destruction. Move-only.
auto mapped = part.mmap(0, part.size());
auto bytes = mapped.as_span<const uint8_t>();
static partition find(enum type type, enum subtype subtype=subtype::any, std::string_view label={})
Finds the first partition matching the given criteria.
@ data_fat
FAT filesystem data.
Definition at line 534 of file partition.hpp.
◆ mmap_handle() [1/3]
| idfxx::partition::mmap_handle::mmap_handle |
( |
| ) |
|
|
default |
Constructs an invalid (unmapped) handle.
◆ ~mmap_handle()
| idfxx::partition::mmap_handle::~mmap_handle |
( |
| ) |
|
◆ mmap_handle() [2/3]
| idfxx::partition::mmap_handle::mmap_handle |
( |
const mmap_handle & |
| ) |
|
|
delete |
◆ mmap_handle() [3/3]
| idfxx::partition::mmap_handle::mmap_handle |
( |
mmap_handle && |
other | ) |
|
|
noexcept |
◆ as_span()
template<typename T >
| std::span< T > idfxx::partition::mmap_handle::as_span |
( |
| ) |
const |
|
inline |
Returns a typed span over the mapped memory region.
- Template Parameters
-
| T | Element type (must be const-qualified). |
- Returns
- A span covering the mapped region.
Definition at line 567 of file partition.hpp.
◆ data()
| const void * idfxx::partition::mmap_handle::data |
( |
| ) |
const |
|
inline |
Returns a pointer to the mapped memory region.
Definition at line 554 of file partition.hpp.
◆ operator bool()
| idfxx::partition::mmap_handle::operator bool |
( |
| ) |
const |
|
inlineexplicit |
Returns true if this handle has a mapped region.
Definition at line 551 of file partition.hpp.
◆ operator=() [1/2]
◆ operator=() [2/2]
Move assignment.
Unmaps any previously mapped region.
◆ release()
| esp_partition_mmap_handle_t idfxx::partition::mmap_handle::release |
( |
| ) |
|
|
noexcept |
Releases ownership without unmapping.
After calling this, the caller is responsible for unmapping the region.
- Returns
- The underlying mmap handle for manual lifecycle management.
◆ size()
| size_t idfxx::partition::mmap_handle::size |
( |
| ) |
const |
|
inline |
◆ partition
The documentation for this class was generated from the following file: