Skip to content

Commit

Permalink
Refactor NVStore code, following PR comments:
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
David Saada committed Jan 24, 2018
1 parent 9091f19 commit f9da807
Show file tree
Hide file tree
Showing 9 changed files with 295 additions and 263 deletions.
136 changes: 60 additions & 76 deletions features/nvstore/TESTS/nvstore/functionality/main.cpp

Large diffs are not rendered by default.

46 changes: 38 additions & 8 deletions features/nvstore/mbed_lib.json
@@ -1,10 +1,40 @@
{
"name": "nvstore",
"config": {
"num_types": {
"macro_name": "NVSTORE_MAX_KEYS",
"value": 16,
"help": "Maximal number of allowed NVStore keys"
}
}
"name": "nvstore",
"config": {
"num_types": {
"macro_name": "NVSTORE_MAX_KEYS",
"value": 16,
"help": "Maximal number of allowed NVStore keys"
},
"area_1_address": {
"macro_name": "NVSTORE_AREA_1_ADDRESS",
"help": "Area 1 address"
},
"area_1_size": {
"macro_name": "NVSTORE_AREA_1_SIZE",
"help": "Area 1 size"
},
"area_2_address": {
"macro_name": "NVSTORE_AREA_2_ADDRESS",
"help": "Area 2 address"
},
"area_2_size": {
"macro_name": "NVSTORE_AREA_2_SIZE",
"help": "Area 2 size"
}
},
"target_overrides": {
"K64F": {
"area_1_address": "0xFE000",
"area_1_size" : "0x1000",
"area_2_address": "0xFF000",
"area_2_size" : "0x1000"
},
"K82F": {
"area_1_address": "0x3E000",
"area_1_size" : "0x1000",
"area_2_address": "0x3F000",
"area_2_size" : "0x1000"
}
}
}

0 comments on commit f9da807

Please sign in to comment.