Go to the documentation of this file.
48 #ifndef __GR55XX_NVDS_H__
49 #define __GR55XX_NVDS_H__
56 #define NV_TAGCAT_APP 0x4000
57 #define NV_TAG_APP(idx) (NV_TAGCAT_APP | ((idx) & 0x3FFF))
101 uint32_t (*p_nvds_flash_read)(
const uint32_t addr, uint8_t *buf,
const uint32_t size);
102 uint32_t (*p_nvds_flash_write_r)(
const uint32_t addr,
const uint8_t *buf,
const uint32_t size);
103 void (*p_nvds_flash_set_security)(
bool enable);
104 bool (*p_nvds_flash_get_security)(void);
105 bool (*p_nvds_flash_erase)(
const uint32_t addr,
const uint32_t size);
106 void (*p_nvds_flash_get_info)(uint32_t *id, uint32_t *size);
112 uint8_t (*p_nvds_init)(uint32_t start_addr, uint8_t sectors);
113 uint8_t (*p_nvds_get)(uint16_t tag, uint16_t *p_len, uint8_t *p_buf);
114 uint8_t (*p_nvds_put)(uint16_t tag, uint16_t len,
const uint8_t *p_buf);
115 uint8_t (*p_nvds_del)(uint16_t tag);
116 uint16_t (*p_nvds_tag_length)(uint16_t tag);
137 uint8_t
nvds_init(uint32_t start_addr, uint8_t sectors);
uint8_t nvds_del(NvdsTag_t tag)
Delete a tag in NVDS.
@ NVDS_SPACE_NOT_ENOUGH
NVDS space is not enough.
@ NVDS_POINTER_NULL
NVDS or driver function repalce error: NULL.
@ NVDS_COMPACT_FAILED
NVDS failed to compact sectors.
@ NVDS_INIT_AREA_SLOP_OVER
NVDS_INIT input parameters cause nvds to out of range.
@ NVDS_INIT_MGR_ERR
When nvds has been initialized and read tag complate, avail size is error.
@ NVDS_INIT_READ_TAG_NOT_COMPLETE
When nvds has been initialized read tag not complate.
NVDS drive function struct.
@ NVDS_NOT_INIT
NVDS not initialize.
@ NVDS_LENGTH_OUT_OF_RANGE
NVDS length out of range.
@ NVDS_GC_COMPLETE
NVDS garbage collection complete.
uint8_t nvds_drv_func_replace(nvds_drv_func_t *p_nvds_drv_func)
Replace the drive function.
@ NVDS_INIT_CHECKSUM_FAIL
When nvds has been initialized and read tag, verification fail.
@ NVDS_INIT_TAG_LEN_ERR
When nvds has been initialized and read tag, the tag length is 0.
@ NVDS_INIT_START_ADDR_NO_ALIGN
NVDS_INIT input parameter start addr is not 4K aligned.
@ NVDS_INVALID_PARA
NVDS invalid params.
@ NVDS_STORAGE_ACCESS_FAILED
NVDS failed to access storage.
void nvds_retention_size(uint8_t bond_dev_num)
Calculate the space reserved for system.
@ NVDS_INVALID_SECTORS
NVDS_INIT input parameter sectors error.
uint8_t nvds_put(NvdsTag_t tag, uint16_t len, const uint8_t *p_buf)
Write data to NVDS.
uint16_t nvds_tag_length(NvdsTag_t tag)
Get the length of a tag in NVDS.
uint16_t NvdsTag_t
NVDS Item tag.
uint8_t nvds_func_replace(nvds_func_t *p_nvds_func)
Replace the function in NVDS.
NVDS_STATUS
NVDS Returned Status.
@ NVDS_SUCCESS
NVDS succeeds.
@ NVDS_TAG_NOT_EXISTED
NVDS tag does not exist.
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.