10#elif defined(USE_ESP8266)
14#elif defined(USE_LIBRETINY)
16#elif defined(USE_HOST)
18#elif defined(USE_ZEPHYR) && defined(CONFIG_SETTINGS)
33 bool sync() {
return false; }
49static_assert(PreferencesContract<ESPPreferences>,
50 "The platform's preferences manager is missing part of the ESPPreferences surface "
51 "(esphome/core/preference_backend.h)");
54#ifdef USE_PREFERENCE_KEY_LOOKUP
56static_assert(PreferencesKeyLookupContract<ESPPreferences>,
57 "This platform emits USE_PREFERENCE_KEY_LOOKUP but its preferences manager does not provide "
58 "load_from_key() (esphome/core/preference_backend.h)");
CRTP mixin providing type-safe template make_preference<T>() helpers.
ESPPreferences * global_preferences
bool reset()
Forget all unsaved changes and re-initialize the permanent preferences storage.
ESPPreferenceObject make_preference(size_t, uint32_t, bool)
bool load_from_key(uint32_t, uint8_t *, size_t)
ESPPreferenceObject make_preference(size_t, uint32_t)
bool sync()
Commit pending writes to flash.