Function esp_idf_sys::spi_flash_mmap_pages
source ยท pub unsafe extern "C" fn spi_flash_mmap_pages(
pages: *const c_int,
page_count: usize,
memory: spi_flash_mmap_memory_t,
out_ptr: *mut *const c_void,
out_handle: *mut spi_flash_mmap_handle_t,
) -> esp_err_t
Expand description
@brief Map sequences of pages of flash memory into data or instruction address space
This function allocates sufficient number of 64kB MMU pages and configures them to map the indicated pages of flash memory contiguously into address space. In this respect, it works in a similar way as spi_flash_mmap() but it allows mapping a (maybe non-contiguous) set of pages into a contiguous region of memory.
@param pages An array of numbers indicating the 64kB pages in flash to be mapped contiguously into memory. These indicate the indexes of the 64kB pages, not the byte-size addresses as used in other functions. Array must be located in internal memory. @param page_count Number of entries in the pages array @param memory Address space where the region should be mapped (instruction or data) @param[out] out_ptr Output, pointer to the mapped memory region @param[out] out_handle Output, handle which should be used for spi_flash_munmap call
@return - ESP_OK on success - ESP_ERR_NO_MEM if pages can not be allocated - ESP_ERR_INVALID_ARG if pagecount is zero or pages array is not in internal memory