Function esp_idf_svc::sys::spi_flash_mmap_pages
source ยท pub unsafe extern "C" fn spi_flash_mmap_pages(
pages: *const i32,
page_count: usize,
memory: u32,
out_ptr: *mut *const c_void,
out_handle: *mut u32,
) -> i32
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