Function esp_idf_svc::sys::esp_flash_get_physical_size

source ·
pub unsafe extern "C" fn esp_flash_get_physical_size(
    chip: *mut esp_flash_t,
    flash_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] flash_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.