ESPHome 2026.5.0-dev
Loading...
Searching...
No Matches
preferences.h
Go to the documentation of this file.
1#pragma once
2#ifdef USE_LIBRETINY
3
5#include <flashdb.h>
6
7namespace esphome::libretiny {
8
9struct NVSData;
10
11class LibreTinyPreferences final : public PreferencesMixin<LibreTinyPreferences> {
12 public:
14 void open();
16 return this->make_preference(length, type);
17 }
19 bool sync();
20 bool reset();
21
22 struct fdb_kvdb db;
23 struct fdb_blob blob;
24
25 protected:
26 bool is_changed_(fdb_kvdb_t db, const NVSData &to_save, const char *key_str);
27};
28
30
31} // namespace esphome::libretiny
32
33DECLARE_PREFERENCE_ALIASES(esphome::libretiny::LibreTinyPreferences)
34
35#endif // USE_LIBRETINY
CRTP mixin providing type-safe template make_preference<T>() helpers.
ESPPreferenceObject make_preference(size_t length, uint32_t type, bool in_flash)
Definition preferences.h:15
bool is_changed_(fdb_kvdb_t db, const NVSData &to_save, const char *key_str)
uint16_t type
static void uint32_t
uint16_t length
Definition tt21100.cpp:0