blob: 6157517e6fc2bbc4103f1ed431340401041e96bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#pragma once
#include "esp_err.h"
// Read the persisted config into viewport_state. Safe to call on a fresh
// device: missing keys keep their first-boot defaults from viewport_state_init.
// Recomputes `configured` (true iff a scrypted URL is present); run state
// is untouched (stays at the boot default).
esp_err_t nvs_config_load(void);
// Persist the current viewport_state to NVS atomically. The caller is expected
// to have already mutated viewport_state under viewport_state_lock().
esp_err_t nvs_config_save(void);
|