|
WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
|


枚举 | |
| enum | nv_attributes_t { NV_ATTRIBUTE_NORMAL = 0x0 , NV_ATTRIBUTE_PERMANENT = 0x1 , NV_ATTRIBUTE_ENCRYPTED = 0x2 , NV_ATTRIBUTE_NON_UPGRADE = 0x4 } |
函数 | |
| nv_direct_ctrl_t * | nv_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 | |
| enum 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_ctrl_t * nv_direct_get_nv_ctrl | ( | void | ) |
| errcode_t uapi_nv_delete_key | ( | uint16_t | key | ) |
Erase an stored value given its key
| key | key of the key to erase |
| 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
| key | key of the value to get |
| length | length of the current key |
| attr | The storage attributes of a key. |
| 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
| 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 |
| 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.
| key | key to associate make permanent |
| attr | Sets the storage attributes of a key. |
| 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.
| key | key to associate kvalue to |
| kvalue | value to store |
| kvalue_length | length in bytes of kvalue |