Function esp_idf_svc::hal::sys::esp_partition_read
source · pub unsafe extern "C" fn esp_partition_read(
partition: *const esp_partition_t,
src_offset: usize,
dst: *mut c_void,
size: usize,
) -> i32
Expand description
@brief Read data from the partition
Partitions marked with an encryption flag will automatically be be read and decrypted via a cache mapping.
@param partition Pointer to partition structure obtained using esp_partition_find_first or esp_partition_get. Must be non-NULL. @param dst Pointer to the buffer where data should be stored. Pointer must be non-NULL and buffer must be at least ‘size’ bytes long. @param src_offset Address of the data to be read, relative to the beginning of the partition. @param size Size of data to be read, in bytes.
@return ESP_OK, if data was read successfully; ESP_ERR_INVALID_ARG, if src_offset exceeds partition size; ESP_ERR_INVALID_SIZE, if read would go out of bounds of the partition; or one of error codes from lower-level flash driver.