pub unsafe extern "C" fn esp_partition_mmap(
    partition: *const esp_partition_t,
    offset: usize,
    size: usize,
    memory: esp_partition_mmap_memory_t,
    out_ptr: *mut *const c_void,
    out_handle: *mut esp_partition_mmap_handle_t
) -> esp_err_t
Expand description

@brief Configure MMU to map partition into data memory

Unlike spi_flash_mmap function, which requires a 64kB aligned base address, this function doesn’t impose such a requirement. If offset results in a flash address which is not aligned to 64kB boundary, address will be rounded to the lower 64kB boundary, so that mapped region includes requested range. Pointer returned via out_ptr argument will be adjusted to point to the requested offset (not necessarily to the beginning of mmap-ed region).

To release mapped memory, pass handle returned via out_handle argument to esp_partition_munmap function.

@param partition Pointer to partition structure obtained using esp_partition_find_first or esp_partition_get. Must be non-NULL. @param offset Offset from the beginning of partition where mapping should start. @param size Size of the area to be mapped. @param memory Memory space where the region should be mapped @param out_ptr Output, pointer to the mapped memory region @param out_handle Output, handle which should be used for esp_partition_munmap call

@return ESP_OK, if successful