Skip to content

Commit f9da807

Browse files
author
David Saada
committed
Refactor NVStore code, following PR comments:
- Add missing documentation in shared_lock and flash wrapper include files. - Fix include files (correctness and order). - Move configuration of addresses and sizes from targets.json to mbed_lib.json. - Change function parameters from pointers to references. - Remove unnecessary NVSTORE_THREAD_SAFE and NVSTORE_PROBE_ONLY defines.
1 parent 9091f19 commit f9da807

File tree

9 files changed

+295
-263
lines changed

9 files changed

+295
-263
lines changed

features/nvstore/TESTS/nvstore/functionality/main.cpp

Lines changed: 60 additions & 76 deletions
Large diffs are not rendered by default.

features/nvstore/mbed_lib.json

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,40 @@
11
{
2-
"name": "nvstore",
3-
"config": {
4-
"num_types": {
5-
"macro_name": "NVSTORE_MAX_KEYS",
6-
"value": 16,
7-
"help": "Maximal number of allowed NVStore keys"
8-
}
9-
}
2+
"name": "nvstore",
3+
"config": {
4+
"num_types": {
5+
"macro_name": "NVSTORE_MAX_KEYS",
6+
"value": 16,
7+
"help": "Maximal number of allowed NVStore keys"
8+
},
9+
"area_1_address": {
10+
"macro_name": "NVSTORE_AREA_1_ADDRESS",
11+
"help": "Area 1 address"
12+
},
13+
"area_1_size": {
14+
"macro_name": "NVSTORE_AREA_1_SIZE",
15+
"help": "Area 1 size"
16+
},
17+
"area_2_address": {
18+
"macro_name": "NVSTORE_AREA_2_ADDRESS",
19+
"help": "Area 2 address"
20+
},
21+
"area_2_size": {
22+
"macro_name": "NVSTORE_AREA_2_SIZE",
23+
"help": "Area 2 size"
24+
}
25+
},
26+
"target_overrides": {
27+
"K64F": {
28+
"area_1_address": "0xFE000",
29+
"area_1_size" : "0x1000",
30+
"area_2_address": "0xFF000",
31+
"area_2_size" : "0x1000"
32+
},
33+
"K82F": {
34+
"area_1_address": "0x3E000",
35+
"area_1_size" : "0x1000",
36+
"area_2_address": "0x3F000",
37+
"area_2_size" : "0x1000"
38+
}
39+
}
1040
}

0 commit comments

Comments
 (0)