Function esp_idf_sys::esp_himem_map

source ·
pub unsafe extern "C" fn esp_himem_map(
    handle: esp_himem_handle_t,
    range: esp_himem_rangehandle_t,
    ram_offset: usize,
    range_offset: usize,
    len: usize,
    flags: c_int,
    out_ptr: *mut *mut c_void,
) -> esp_err_t
Expand description

@brief Map a block of high memory into the CPUs address space

This effectively makes the block available for read/write operations.

@note The region to be mapped needs to have offsets and sizes that are aligned to the SPI RAM MMU block size (32K)

@param handle Handle to the block of memory, as given by esp_himem_alloc @param range Range handle to map the memory in @param ram_offset Offset into the block of physical memory of the block to map @param range_offset Offset into the address range where the block will be mapped @param len Length of region to map @param flags One of ESP_HIMEM_MAPFLAG_* @param[out] out_ptr Pointer to variable to store resulting memory pointer in @returns - ESP_OK if the memory could be mapped - ESP_ERR_INVALID_ARG if offset, range or len aren’t MMU-block-aligned (32K) - ESP_ERR_INVALID_SIZE if the offsets/lengths don’t fit in the allocated memory or range - ESP_ERR_INVALID_STATE if a block in the selected ram offset/length is already mapped, or if a block in the selected range offset/length already has a mapping.