DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
Loading...
Searching...
No Matches
config_store.h File Reference

Typed NVS configuration store (DETWS_ENABLE_CONFIG_STORE). More...

#include "ServerConfig.h"
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Detailed Description

Typed NVS configuration store (DETWS_ENABLE_CONFIG_STORE).

A small typed key/value API for core device settings - WiFi credentials, IP configuration, feature toggles - that routes them into the ESP32's native Non-Volatile Storage (NVS) partition as binary entries, rather than a JSON text file on the filesystem. NVS is wear-levelled and independent of the LittleFS/SPIFFS partition, so configuration survives a filesystem corruption and credentials live in the storage area meant for them.

Three value types: null-terminated strings, uint32_t, and raw blobs - each with a default returned when the key is absent. On ESP32 the backend is the Arduino Preferences NVS wrapper; on host builds it is a fixed in-memory table (DETWS_CONFIG_MAX_ENTRIES x DETWS_CONFIG_VAL_MAX) so the typed contract is unit-testable without flash.

Writes hit NVS, so call the setters at provisioning / config time, not in the request hot path. Keys are limited to 15 chars (NVS), plus null.

Author
Douglas Quigg (dstroy0)
Date
2026

Definition in file config_store.h.