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.
Address where the data should be written, relative to the beginning of the partition.
src
constvoid*
Pointer to the source buffer. Pointer must be non-NULL and buffer must be at least 'size' bytes long.
size
size_t
Size of data to be written, in bytes.
Return value
- 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.
Notes
Prior to writing to WL storage, make sure it has been erased with wl_erase_range call.
Examples
wl_write() is referenced by 2 libraries and example projects: