Manages a block of himem memory with mapping functionality.
More...
#include <VectorHIMEM.h>
|
size_t | current_mapped_block |
|
esp_himem_handle_t | handle = 0 |
|
void * | mapped_ptr = nullptr |
|
esp_himem_rangehandle_t | range = 0 |
|
size_t | size = 0 |
|
Manages a block of himem memory with mapping functionality.
◆ allocate()
bool esp32_psram::HimemBlock::allocate |
( |
size_t |
block_size | ) |
|
|
inline |
Allocate a block of himem.
- Parameters
-
block_size | Size of memory to allocate in bytes |
- Returns
- true if allocation was successful, false otherwise
◆ ensure_block_mapped()
bool esp32_psram::HimemBlock::ensure_block_mapped |
( |
size_t |
block_index | ) |
|
|
inlineprotected |
Ensure a specific block is mapped into memory.
- Parameters
-
block_index | The index of the block to map |
- Returns
- true if mapping successful, false otherwise
◆ get_size()
size_t esp32_psram::HimemBlock::get_size |
( |
| ) |
const |
|
inline |
Get the size of the allocated block.
- Returns
- Size of the allocated block in bytes
◆ read()
size_t esp32_psram::HimemBlock::read |
( |
void * |
dest, |
|
|
size_t |
offset, |
|
|
size_t |
length |
|
) |
| |
|
inline |
Read data from HIMEM at specified offset.
- Parameters
-
dest | Destination buffer |
offset | Offset in HIMEM to read from |
length | Number of bytes to read |
- Returns
- Number of bytes actually read
◆ write()
size_t esp32_psram::HimemBlock::write |
( |
const void * |
src, |
|
|
size_t |
offset, |
|
|
size_t |
length |
|
) |
| |
|
inline |
Write data to HIMEM at specified offset.
- Parameters
-
src | Source buffer |
offset | Offset in HIMEM to write to |
length | Number of bytes to write |
- Returns
- Number of bytes actually written
◆ current_mapped_block
size_t esp32_psram::HimemBlock::current_mapped_block |
|
protected |
The documentation for this class was generated from the following file: