Lines Matching refs:fp
43 static void config_parse(nvs_handle_t fp, config_t *config);
84 nvs_handle_t fp; in config_new() local
85 err = nvs_open(filename, NVS_READWRITE, &fp); in config_new()
97 config_parse(fp, config); in config_new()
98 nvs_close(fp); in config_new()
358 static int get_config_size_from_flash(nvs_handle_t fp) in get_config_size_from_flash() argument
360 assert(fp != 0); in get_config_size_from_flash()
373 err = nvs_get_blob(fp, keyname, NULL, &length); in get_config_size_from_flash()
387 err = nvs_get_blob(fp, keyname, NULL, &length); in get_config_size_from_flash()
411 nvs_handle_t fp; in config_save() local
422 err = nvs_open(filename, NVS_READWRITE, &fp); in config_save()
480 err = nvs_set_blob(fp, keyname, buf, w_cnt_total); in config_save()
482 nvs_close(fp); in config_save()
493 …err = nvs_set_blob(fp, keyname, buf + i*CONFIG_FILE_MAX_SIZE, w_cnt_total - i*CONFIG_FILE_MAX_SIZE… in config_save()
496 err = nvs_set_blob(fp, keyname, buf + i*CONFIG_FILE_MAX_SIZE, CONFIG_FILE_MAX_SIZE); in config_save()
500 nvs_close(fp); in config_save()
507 err = nvs_commit(fp); in config_save()
509 nvs_close(fp); in config_save()
514 nvs_close(fp); in config_save()
555 static void config_parse(nvs_handle_t fp, config_t *config) in config_parse() argument
557 assert(fp != 0); in config_parse()
570 int buf_size = get_config_size_from_flash(fp); in config_parse()
582 err = nvs_get_blob(fp, keyname, buf, &length); in config_parse()
594 err = nvs_get_blob(fp, keyname, buf + CONFIG_FILE_MAX_SIZE * i, &length); in config_parse()