[][src]Function esp_idf_bindgen::esp_flash_get_size

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

@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.

@note 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.

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