Go to the documentation of this file.
48 #ifndef __GR533X_NVDS_H__
49 #define __GR533X_NVDS_H__
56 #define NV_TAGCAT_APP 0x4000
57 #define NV_TAG_APP(idx) (NV_TAGCAT_APP | ((idx) & 0x3FFF))
110 uint32_t (*p_nvds_flash_read)(
const uint32_t addr, uint8_t *buf,
const uint32_t size);
111 uint32_t (*p_nvds_flash_write_r)(
const uint32_t addr,
const uint8_t *buf,
const uint32_t size);
112 void (*p_nvds_flash_set_security)(
bool enable);
113 bool (*p_nvds_flash_get_security)(void);
114 bool (*p_nvds_flash_erase)(
const uint32_t addr,
const uint32_t size);
115 void (*p_nvds_flash_get_info)(uint32_t *id, uint32_t *size);
121 uint8_t (*p_nvds_init)(uint32_t start_addr, uint8_t sectors);
122 uint8_t (*p_nvds_get)(uint16_t tag, uint16_t *p_len, uint8_t *p_buf);
123 uint8_t (*p_nvds_put)(uint16_t tag, uint16_t len,
const uint8_t *p_buf);
124 uint8_t (*p_nvds_del)(uint16_t tag);
125 uint16_t (*p_nvds_tag_length)(uint16_t tag);
154 uint8_t
nvds_init(uint32_t start_addr, uint8_t sectors);
uint8_t nvds_del(NvdsTag_t tag)
Delete a tag in NVDS.
void nvds_retention_size(uint8_t bond_dev_num, mesh_config_dev_num_t mesh_config_dev_num)
Calculate the space reserved for system.
@ NVDS_INIT_AREA_SLOP_OVER
NVDS drive function struct.
uint8_t mesh_app_key_list_num
@ NVDS_INIT_MULT_SECTOR_NUM_ERR
@ NVDS_INIT_READ_TAG_NOT_COMPLETE
@ NVDS_LENGTH_OUT_OF_RANGE
uint8_t nvds_drv_func_replace(nvds_drv_func_t *p_nvds_drv_func)
Replace the drive function.
@ NVDS_INIT_CHECKSUM_FAIL
@ NVDS_STORAGE_ACCESS_FAILED
@ NVDS_INIT_START_ADDR_NO_ALIGN
@ NVDS_INIT_SING_SECTOR_NUM_ERR
uint8_t nvds_put(NvdsTag_t tag, uint16_t len, const uint8_t *p_buf)
Write data to NVDS. If the tag does not exist, create one.
uint16_t nvds_tag_length(NvdsTag_t tag)
Get the length of a tag in NVDS.
uint16_t NvdsTag_t
NVDS Item tag.
NVDS_INIT_ERR_CODE
NVDS initialization Return error code.
uint8_t mesh_piblic_subscr_list_num
uint8_t nvds_func_replace(nvds_func_t *p_nvds_func)
Replace the function in NVDS.
uint8_t mesh_net_key_list_num
NVDS_STATUS
NVDS Returned Status.
uint8_t nvds_init(uint32_t start_addr, uint8_t sectors)
Initialize the sectors for NVDS.
uint8_t nvds_get(NvdsTag_t tag, uint16_t *p_len, uint8_t *p_buf)
Read data from NVDS.
@ NVDS_INVALID_START_ADDR