nRF Connect SDK API 2.8.0
Loading...
Searching...
No Matches

◆ psa_ps_set()

psa_status_t psa_ps_set ( psa_storage_uid_t uid,
size_t data_length,
const void * p_data,
psa_storage_create_flags_t create_flags )

#include <include/protected_storage.h>

Create a new, or modify an existing, uid/value pair.

Stores data in the protected storage.

Parameters
[in]uidThe identifier for the data
[in]data_lengthThe size in bytes of the data in p_data
[in]p_dataA buffer containing the data
[in]create_flagsThe flags that the data will be stored with
Returns
A status indicating the success/failure of the operation
Return values
PSA_SUCCESSThe operation completed successfully
PSA_ERROR_NOT_PERMITTEDThe operation failed because the provided uid value was already created with PSA_STORAGE_FLAG_WRITE_ONCE
PSA_ERROR_INVALID_ARGUMENTThe operation failed because one of the provided pointers(p_data) is invalid, for example is NULL or references memory the caller cannot access
PSA_ERROR_NOT_SUPPORTEDThe operation failed because one or more of the flags provided in create_flags is not supported or is not valid
PSA_ERROR_INSUFFICIENT_STORAGEThe operation failed because there was insufficient space on the storage medium
PSA_ERROR_STORAGE_FAILUREThe operation failed because the physical storage has failed (Fatal error)
PSA_ERROR_GENERIC_ERRORThe operation failed because of an unspecified internal failure