Lines Matching refs:name_id

80 				   uint16_t name_id)  in settings_nvs_cache_add()  argument
85 cf->cache[cf->cache_next++].name_id = name_id; in settings_nvs_cache_add()
101 if (cf->cache[i].name_id <= NVS_NAMECNT_ID) { in settings_nvs_cache_match()
105 rc = nvs_read(&cf->cf_nvs, cf->cache[i].name_id, rdname, len); in settings_nvs_cache_match()
116 return cf->cache[i].name_id; in settings_nvs_cache_match()
132 uint16_t name_id = NVS_NAMECNT_ID; in settings_nvs_load() local
140 name_id = cf->last_name_id + 1; in settings_nvs_load()
144 name_id--; in settings_nvs_load()
145 if (name_id == NVS_NAMECNT_ID) { in settings_nvs_load()
157 rc1 = nvs_read(&cf->cf_nvs, name_id, &name, sizeof(name)); in settings_nvs_load()
158 rc2 = nvs_read(&cf->cf_nvs, name_id + NVS_NAME_ID_OFFSET, in settings_nvs_load()
167 if (name_id == cf->last_name_id) { in settings_nvs_load()
182 nvs_delete(&cf->cf_nvs, name_id); in settings_nvs_load()
183 nvs_delete(&cf->cf_nvs, name_id + NVS_NAME_ID_OFFSET); in settings_nvs_load()
185 if (name_id == cf->last_name_id) { in settings_nvs_load()
197 read_fn_arg.id = name_id + NVS_NAME_ID_OFFSET; in settings_nvs_load()
200 settings_nvs_cache_add(cf, name, name_id); in settings_nvs_load()
220 uint16_t name_id, write_name_id; in settings_nvs_save() local
234 name_id = settings_nvs_cache_match(cf, name, rdname, sizeof(rdname)); in settings_nvs_save()
235 if (name_id != NVS_NAMECNT_ID) { in settings_nvs_save()
236 write_name_id = name_id; in settings_nvs_save()
243 name_id = cf->last_name_id + 1; in settings_nvs_save()
255 name_id--; in settings_nvs_save()
256 if (name_id == NVS_NAMECNT_ID) { in settings_nvs_save()
260 rc = nvs_read(&cf->cf_nvs, name_id, &rdname, sizeof(rdname)); in settings_nvs_save()
265 write_name_id = name_id; in settings_nvs_save()
277 write_name_id = name_id; in settings_nvs_save()
286 if (name_id == NVS_NAMECNT_ID) { in settings_nvs_save()
290 rc = nvs_delete(&cf->cf_nvs, name_id); in settings_nvs_save()
292 rc = nvs_delete(&cf->cf_nvs, name_id + in settings_nvs_save()
300 if (name_id == cf->last_name_id) { in settings_nvs_save()