21#define RECORD_NVM "nvm"
32 NvmKeyBlePairingData = 0x10001UL,
33 NvmKeyCryptoAccessMode = 0x10002UL,
68bool nvm_read(
Nvm* instance, uint32_t key,
void* data,
size_t len);
101bool nvm_write(
Nvm* instance, uint32_t key,
const void* data,
size_t len);
FURI_CHECK_RETURN bool nvm_delete(Nvm *instance, uint32_t key)
Delete the record under a given key.
Definition nvm.c:80
FURI_CHECK_RETURN bool nvm_write_counter(Nvm *instance, uint32_t key, uint32_t value)
Write the counter value under a given key.
Definition nvm.c:70
FURI_CHECK_RETURN bool nvm_read(Nvm *instance, uint32_t key, void *data, size_t len)
Read the record data under a given key.
Definition nvm.c:42
FURI_CHECK_RETURN bool nvm_increment_counter(Nvm *instance, uint32_t key, uint32_t *value)
Increment the counter under a given key by 1 and optionally get its value.
Definition nvm.c:75
FURI_CHECK_RETURN bool nvm_purge_all(Nvm *instance)
Erase all data AND metadata from the storage.
Definition nvm.c:95
bool nvm_exists(Nvm *instance, uint32_t key, size_t *len)
Check if a record exists under a given key and optionally get its length.
Definition nvm.c:32
FURI_CHECK_RETURN bool nvm_repack(Nvm *instance)
Repack the storage to optimise space.
Definition nvm.c:85
FURI_CHECK_RETURN bool nvm_read_partial(Nvm *instance, uint32_t key, void *data, size_t offset, size_t len)
Read the record data under a given key partially.
Definition nvm.c:49
NvmKeyRange
Enumeration of available Nvm key ranges.
Definition nvm.h:29
@ NvmKeyRangeMax
Maximum key value (non-inclusive)
Definition nvm.h:38
@ NvmKeyRangeUser2Min
Free to use key range 2 start (inclusive)
Definition nvm.h:36
@ NvmKeyRangeUser1Max
Free to use key range 1 end (non-inclusive)
Definition nvm.h:35
@ NvmKeyRangeUser1Min
Free to use key range 1 start (inclusive)
Definition nvm.h:31
@ NvmKeyRangeMin
Minimum key value (inclusive)
Definition nvm.h:30
FURI_CHECK_RETURN bool nvm_write(Nvm *instance, uint32_t key, const void *data, size_t len)
Write data to a record under a given key.
Definition nvm.c:56
FURI_CHECK_RETURN bool nvm_erase_all(Nvm *instance)
Erase all data from the storage.
Definition nvm.c:90
FURI_CHECK_RETURN bool nvm_read_counter(Nvm *instance, uint32_t key, uint32_t *value)
Read the counter value under a given key.
Definition nvm.c:63