![]() |
nRF Connect SDK Bare Metal API 2.0.99
|
| int bm_storage_write | ( | const struct bm_storage * | storage, |
| uint32_t | dest, | ||
| const void * | src, | ||
| uint32_t | len, | ||
| void * | ctx ) |
#include <bm_storage.h>
Write data to storage.
The write address and length must be a multiple of the backend's program unit. If bm_storage_config.flags.is_wear_aligned is set, alignment to the wear unit is required instead.
| [in] | storage | Storage instance to write data to. |
| [in] | dest | Offset within the partition where to write the data to. |
| [in] | src | Data to be written. |
| [in] | len | Length of the data to be written (in bytes). |
| [in] | ctx | User-defined context sent to the event handler. |
| 0 | on success. |
| -EFAULT | The storage instance storage or src is NULL. |
| -EPERM | The storage instance storage is not initialized. |
| -EINVAL | The dest or len parameters are unaligned. |
| -ENOMEM | Out of memory to perform the requested operation. |
| -EBUSY | The operation could not be accepted at this time. |
| -EIO | An internal error has occurred. |