pub unsafe extern "C" fn esp_flash_get_size(
    chip: *mut esp_flash_t,
    out_size: *mut u32
) -> i32
Expand description

@brief Detect flash size based on flash ID.

@param chip Pointer to identify flash chip. Must have been successfully initialised via esp_flash_init() @param[out] out_size Detected size in bytes, standing for the size in the binary image header.

@note 1. Most flash chips use a common format for flash ID, where the lower 4 bits specify the size as a power of 2. If the manufacturer doesn’t follow this convention, the size may be incorrectly detected. 2. The out_size returned only stands for The out_size stands for the size in the binary image header. If you want to get the real size of the chip, please call esp_flash_get_physical_size instead.

@return ESP_OK on success, or a flash error code if operation failed.