Lines Matching full:fs
47 #include <zephyr/fs/nvs.h>
49 static struct nvs_fs fs; variable
81 fs.flash_device = NVS_PARTITION_DEVICE; in main()
82 if (!device_is_ready(fs.flash_device)) { in main()
83 printk("Flash device %s is not ready\n", fs.flash_device->name); in main()
86 fs.offset = NVS_PARTITION_OFFSET; in main()
87 rc = flash_get_page_info_by_offs(fs.flash_device, fs.offset, &info); in main()
92 fs.sector_size = info.size; in main()
93 fs.sector_count = 3U; in main()
95 rc = nvs_mount(&fs); in main()
105 rc = nvs_read(&fs, ADDRESS_ID, &buf, sizeof(buf)); in main()
112 (void)nvs_write(&fs, ADDRESS_ID, &buf, strlen(buf)+1); in main()
116 rc = nvs_read(&fs, KEY_ID, &key, sizeof(key)); in main()
133 (void)nvs_write(&fs, KEY_ID, &key, sizeof(key)); in main()
138 rc = nvs_read(&fs, RBT_CNT_ID, &reboot_counter, sizeof(reboot_counter)); in main()
145 (void)nvs_write(&fs, RBT_CNT_ID, &reboot_counter, in main()
152 rc = nvs_read(&fs, STRING_ID, &buf, sizeof(buf)); in main()
159 (void)nvs_delete(&fs, STRING_ID); in main()
167 (void)nvs_write(&fs, STRING_ID, &buf, strlen(buf) + 1); in main()
174 rc = nvs_read(&fs, LONG_ID, &longarray, sizeof(longarray)); in main()
191 &fs, LONG_ID, &longarray, sizeof(longarray)); in main()
207 &fs, RBT_CNT_ID, in main()
231 &fs, RBT_CNT_ID, &reboot_counter, in main()
242 (void)nvs_write(&fs, RBT_CNT_ID, &reboot_counter, in main()