Function esp_idf_hal::sys::esp_flash_get_protectable_regions
source · pub unsafe extern "C" fn esp_flash_get_protectable_regions(
chip: *const esp_flash_t,
out_regions: *mut *const esp_flash_region_t,
out_num_regions: *mut u32,
) -> i32
Expand description
@brief Read the list of individually protectable regions of this SPI flash chip.
@param chip Pointer to identify flash chip. Must have been successfully initialised via esp_flash_init() @param[out] out_regions Pointer to receive a pointer to the array of protectable regions of the chip. @param[out] out_num_regions Pointer to an integer receiving the count of protectable regions in the array returned in ‘regions’.
@note Correct behaviour of this function depends on the SPI flash chip model and chip_drv in use (via the ‘chip->drv’ field).
@return ESP_OK on success, or a flash error code if operation failed.