Skip to content

Commit f078124

Browse files
author
Amanda Butler
authored
Edit README.md
Edit README with changes from docs site and minor formatting changes.
1 parent 6ddff63 commit f078124

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

features/nvstore/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# NVStore
22

3-
A lightweight module providing the functionality of storing data by keys in the internal flash, for security purpose.
3+
NVStore is a lightweight module that stores data by keys in the internal flash for security purposes.
44

55
## Description
66

77
NVStore provides the ability to store a minimal set of system critical items in the internal flash.
8-
For each item key, NVStore module provides the ability to set the item data or get it.
9-
Newly set values are added to the flash (as in journal), with the effect of overriding the previous value for this key.
8+
For each item key, the NVStore module provides the ability to set the item data or get it.
9+
Newly added values are added to the end of the existing data, superseding the previous value that was there for the same key.
1010
The NVStore module ensures that power failures don't harm existing data during any operation.
11-
The full interface can be found under nvstore.h.
11+
The full interface can be found under `nvstore.h`.
1212

1313
### Flash structure
1414
NVStore uses two Flash areas, active and nonactive. Each area must consist of at least one erasable unit (sector).
@@ -31,28 +31,28 @@ Each item is kept in an entry containing a header and data, where the header hol
3131
## Usage
3232

3333
### Enabling NVStore and configuring it for your board
34-
NVStore is enabled by default for all devices having the internal flash driver (have "FLASH" in the device_has attribute).
34+
NVStore is enabled by default for all devices with the internal flash driver (have "FLASH" in the device_has attribute).
3535
One can disable it by setting its "enabled" attribute to false.
3636
Unless specifically configured by the user, NVStore selects the last two flash sectors as its areas, with the mininum size of 4KBs,
3737
meaning that if the sectors are smaller, few continuous ones will be used for each area.
38-
The user can override this by setting the addresses and sizes of both areas in mbed_lib.json on a per board basis.
38+
The user can override this by setting the addresses and sizes of both areas in` mbed_lib.json` on a per board basis.
3939
In this case, all following four attributes need to be set:
4040
- area_1_address
4141
- area_1_size
4242
- area_2_address
4343
- area_2_size
4444

45-
In addition, the num_keys value should be modified, in order to change the default number of different keys.
45+
In addition, the `num_keys` value should be modified to change the default number of different keys.
4646

4747
### Using NVStore
4848
NVStore is a singleton class, meaning that the system can have only a single instance of it.
49-
To instanciate NVStore, one needs to call its get_instance member function as following:
49+
To instantiate NVStore, one needs to call its get_instance member function as following:
5050
``` c++
5151
NVStore &nvstore = NVStore::get_instance();
5252
```
53-
After the NVStore instantiation, one can call the init API, but it is not necessary, as all
54-
NVStore APIs (get, set et al.) perform a "lazy initialization".
53+
After the NVStore instantiation, one can call the init API, but it is not necessary because all
54+
NVStore APIs (get, set and so on) perform a "lazy initialization".
5555

5656
### Testing NVStore
57-
Run the NVStore functionality test with the mbed command as following:
58-
mbed test -n features-nvstore-tests-nvstore-functionality
57+
Run the NVStore functionality test with the `mbed` command as following:
58+
```mbed test -n features-nvstore-tests-nvstore-functionality```

0 commit comments

Comments
 (0)