WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
nv_storage.h 文件参考
#include "nv_notify.h"
#include "nv.h"
#include "errcode.h"
nv_storage.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

枚举

enum  nv_attributes_t { NV_ATTRIBUTE_NORMAL = 0x0 , NV_ATTRIBUTE_PERMANENT = 0x1 , NV_ATTRIBUTE_ENCRYPTED = 0x2 , NV_ATTRIBUTE_NON_UPGRADE = 0x4 }
 

函数

nv_direct_ctrl_tnv_direct_get_nv_ctrl (void)
 
errcode_t uapi_nv_write_force (uint16_t key, const uint8_t *kvalue, uint16_t kvalue_length)
 
errcode_t uapi_nv_delete_key (uint16_t key)
 
errcode_t uapi_nv_update_key_attr (uint16_t key, nv_key_attr_t *attr, nv_storage_completed_callback func)
 
errcode_t uapi_nv_get_key_attr (uint16_t key, uint16_t *length, nv_key_attr_t *attr)
 
bool uapi_nv_is_stored (uint16_t key, uint16_t kvalue_length, const uint8_t *kvalue)
 compare a value associated with a specific key. CNcomment:检验特定NV的值 CNend
 

枚举类型说明

◆ nv_attributes_t

KV key attribute flags A key with a normal or encrypted attribute can be set to a permanent attribute again. A key with a permanent attribute cannot be set to another attribute. Attribute 3 is considered to be both encrypted and permanent.

枚举值
NV_ATTRIBUTE_NORMAL 
NV_ATTRIBUTE_PERMANENT 
NV_ATTRIBUTE_ENCRYPTED 
NV_ATTRIBUTE_NON_UPGRADE 

函数说明

◆ nv_direct_get_nv_ctrl()

nv_direct_ctrl_t * nv_direct_get_nv_ctrl ( void  )

◆ uapi_nv_delete_key()

errcode_t uapi_nv_delete_key ( uint16_t  key)

Erase an stored value given its key

参数
keykey of the key to erase
返回
SOC_ERR_SUCCESS or an error code

◆ uapi_nv_get_key_attr()

errcode_t uapi_nv_get_key_attr ( uint16_t  key,
uint16_t *  length,
nv_key_attr_t attr 
)

Get key information associated with a specific key

参数
keykey of the value to get
lengthlength of the current key
attrThe storage attributes of a key.
返回
SOC_ERR_SUCCESS or an error code

◆ uapi_nv_is_stored()

bool uapi_nv_is_stored ( uint16_t  key,
uint16_t  kvalue_length,
const uint8_t *  kvalue 
)

compare a value associated with a specific key. CNcomment:检验特定NV的值 CNend

描述:
Check whether NV data has been stored. If the stored data is the same as the input parameter data,a success message is returned. CNcomment:检查NV数据是否已存储。如果存储的数据与入参数据相同,则返回成功 CNend
注意
None.
参数
key[IN] The key to which the kvalue is associated. CNcomment:要检验的NV ID CNend
kvalue_length[IN] Length of kvalue in bytes. CNcomment:要检验的NV长度 CNend
kvalue[IN] The value to store.CNcomment:待进行对比的NV值 CNend
返回值
trueSuccess
falseFailure
依赖:
参见
None

◆ uapi_nv_update_key_attr()

errcode_t uapi_nv_update_key_attr ( uint16_t  key,
nv_key_attr_t attr,
nv_storage_completed_callback  func 
)

Update the attributes of an existing key.

参数
keykey to associate make permanent
attrSets the storage attributes of a key.
返回
SOC_ERR_SUCCESS or an error code
注解
This key can not then be deleted or overwitten, and there is no mechanism to undo this

◆ uapi_nv_write_force()

errcode_t uapi_nv_write_force ( uint16_t  key,
const uint8_t *  kvalue,
uint16_t  kvalue_length 
)

Force store a key value pair, even if the key has been set to permanent.

参数
keykey to associate kvalue to
kvaluevalue to store
kvalue_lengthlength in bytes of kvalue
返回
SOC_ERR_SUCCESS or an error code