Skip to content

Commit 63c2347

Browse files
de-nordiccarlescufi
authored andcommitted
samples/nvs: Switch flash_area_offset to use STORAGE_NODE_LABEL
The sample has been defining STORAGE_NODE_LABEL to be used to point to storage partition, but flash_area_offset has still been using "storage" directly. Signed-off-by: Dominik Ermel <[email protected]>
1 parent 99279c0 commit 63c2347

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

samples/subsys/nvs/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ void main(void)
7474
/* define the nvs file system by settings with:
7575
* sector_size equal to the pagesize,
7676
* 3 sectors
77-
* starting at FLASH_AREA_OFFSET(storage)
77+
* starting at FLASH_AREA_OFFSET(STORAGE_NODE_LABEL)
7878
*/
7979
fs.flash_device = FLASH_AREA_DEVICE(STORAGE_NODE_LABEL);
8080
if (!device_is_ready(fs.flash_device)) {
8181
printk("Flash device %s is not ready\n", fs.flash_device->name);
8282
return;
8383
}
84-
fs.offset = FLASH_AREA_OFFSET(storage);
84+
fs.offset = FLASH_AREA_OFFSET(STORAGE_NODE_LABEL);
8585
rc = flash_get_page_info_by_offs(fs.flash_device, fs.offset, &info);
8686
if (rc) {
8787
printk("Unable to get page info\n");

0 commit comments

Comments
 (0)