Function esp_idf_svc::sys::wl_write
source · pub unsafe extern "C" fn wl_write(
handle: i32,
dest_addr: usize,
src: *const c_void,
size: usize,
) -> i32
Expand description
@brief Write data to the WL storage
Before writing data to flash, corresponding region of flash needs to be erased. This can be done using wl_erase_range function.
@param handle WL handle corresponding to the WL partition @param dest_addr Address where the data should be written, relative to the beginning of the partition. @param src Pointer to the source buffer. Pointer must be non-NULL and buffer must be at least ‘size’ bytes long. @param size Size of data to be written, in bytes.
@note Prior to writing to WL storage, make sure it has been erased with wl_erase_range call.
@return - ESP_OK, if data was written successfully; - ESP_ERR_INVALID_ARG, if dst_offset exceeds partition size; - ESP_ERR_INVALID_SIZE, if write would go out of bounds of the partition; - or one of error codes from lower-level flash driver.