|
idfxx 1.0.0
Modern C++23 components for ESP-IDF
|
A memory-mapped partition region. More...
Public Member Functions | |
| mmap_handle ()=default | |
| Constructs an invalid (unmapped) handle. | |
| ~mmap_handle () | |
| mmap_handle (const mmap_handle &)=delete | |
| mmap_handle & | operator= (const mmap_handle &)=delete |
| mmap_handle (mmap_handle &&other) noexcept | |
| Move constructor. | |
| mmap_handle & | operator= (mmap_handle &&other) noexcept |
| Move assignment. | |
| operator bool () const | |
| Returns true if this handle has a mapped region. | |
| const void * | data () const |
| Returns a pointer to the mapped memory region. | |
| size_t | size () const |
| Returns the size of the mapped region in bytes. | |
| template<typename T > | |
| std::span< T > | as_span () const |
| Returns a typed span over the mapped memory region. | |
| esp_partition_mmap_handle_t | release () noexcept |
| Releases ownership without unmapping. | |
Friends | |
| class | partition |
A memory-mapped partition region.
Provides direct memory access to partition contents. The mapped region is automatically unmapped on destruction. Move-only.
Definition at line 534 of file partition.hpp.
|
default |
Constructs an invalid (unmapped) handle.
| idfxx::partition::mmap_handle::~mmap_handle | ( | ) |
|
delete |
|
noexcept |
Move constructor.
Returns a typed span over the mapped memory region.
| T | Element type (must be const-qualified). |
Definition at line 567 of file partition.hpp.
Returns a pointer to the mapped memory region.
Definition at line 554 of file partition.hpp.
|
inlineexplicit |
Returns true if this handle has a mapped region.
Definition at line 551 of file partition.hpp.
|
delete |
|
noexcept |
Move assignment.
Unmaps any previously mapped region.
|
noexcept |
Releases ownership without unmapping.
After calling this, the caller is responsible for unmapping the region.
|
inline |
Returns the size of the mapped region in bytes.
Definition at line 557 of file partition.hpp.
Referenced by idfxx::partition::mmap().
Definition at line 582 of file partition.hpp.