Modules | |
Local Flash Functions | |
Functions | |
uint8_t | nvds_init (uint32_t start_addr, uint8_t sectors) |
Initialize the sectors for NVDS. More... | |
uint8_t | nvds_deinit (uint32_t start_addr, uint8_t sectors) |
De-initialize the sectors for NVDS. More... | |
uint8_t | nvds_get (NvdsTag_t tag, uint16_t *p_len, uint8_t *p_buf) |
Read data from NVDS. More... | |
uint8_t | nvds_put (NvdsTag_t tag, uint16_t len, const uint8_t *p_buf) |
Write data to NVDS. More... | |
uint8_t | nvds_del (NvdsTag_t tag) |
Delete a tag in NVDS. More... | |
uint16_t | nvds_tag_length (NvdsTag_t tag) |
Get the length of a tag in NVDS. More... | |
uint8_t nvds_deinit | ( | uint32_t | start_addr, |
uint8_t | sectors | ||
) |
De-initialize the sectors for NVDS.
[in] | start_addr | Start address of NVDS area. If the value does not equal zero, it must be sector-aligned. If the value equals zero, NVDS area will locate in the last sector(s) in flash memory. |
[in] | sectors | The number of sectors. |
uint8_t nvds_del | ( | NvdsTag_t | tag | ) |
Delete a tag in NVDS.
[in] | tag | The tag to be deleted. |
uint8_t nvds_get | ( | NvdsTag_t | tag, |
uint16_t * | p_len, | ||
uint8_t * | p_buf | ||
) |
Read data from NVDS.
[in] | tag | Valid NVDS item tag. |
[in,out] | p_len | Pointer to the length of data. |
[out] | p_buf | Data is read into the buffer. |
uint8_t nvds_init | ( | uint32_t | start_addr, |
uint8_t | sectors | ||
) |
Initialize the sectors for NVDS.
[in] | start_addr | Start address of NVDS area. If the value equals zero, NVDS area will locate in the last sector(s) in flash memory. If the value does not equal zero, it must be sector-aligned. |
[in] | sectors | The number of sectors. |
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.
[in] | tag | Valid NVDS item tag. |
[in] | len | Length of data to be written, the max length of data is 1024 bytes. |
[in] | p_buf | Data to be written. |
uint16_t nvds_tag_length | ( | NvdsTag_t | tag | ) |
Get the length of a tag in NVDS.
[in] | tag | The tag to get the length. |