ESPHome 2026.5.0-dev
Loading...
Searching...
No Matches
preferences.h
Go to the documentation of this file.
1#pragma once
2#ifdef USE_ESP8266
3
5
6namespace esphome::esp8266 {
7
8class ESP8266Preferences final : public PreferencesMixin<ESP8266Preferences> {
9 public:
11 void setup();
14#ifdef USE_ESP8266_PREFERENCES_FLASH
15 return this->make_preference(length, type, true);
16#else
17 return this->make_preference(length, type, false);
18#endif
19 }
20 bool sync();
21 bool reset();
22
25};
26
28void preferences_prevent_write(bool prevent);
29
30} // namespace esphome::esp8266
31
32DECLARE_PREFERENCE_ALIASES(esphome::esp8266::ESP8266Preferences)
33
34#endif // USE_ESP8266
CRTP mixin providing type-safe template make_preference<T>() helpers.
ESPPreferenceObject make_preference(size_t length, uint32_t type)
Definition preferences.h:13
ESPPreferenceObject make_preference(size_t length, uint32_t type, bool in_flash)
uint16_t type
void preferences_prevent_write(bool prevent)
static void uint32_t
uint16_t length
Definition tt21100.cpp:0