ESPHome 2026.12.0-dev
Loading...
Searching...
No Matches
preference_backend.h
Go to the documentation of this file.
1#pragma once
2#ifdef USE_HOST
3
4#include <cstddef>
5#include <cstdint>
6
7namespace esphome::host {
8
10 public:
12
13 bool save(const uint8_t *data, size_t len) const;
14 bool load(uint8_t *data, size_t len) const;
15 bool sync() const;
16
17 protected:
19};
20
21class HostPreferences;
23
24} // namespace esphome::host
25
26namespace esphome {
27using PreferenceBackend = host::HostPreferenceBackend;
28} // namespace esphome
29
30#endif // USE_HOST
bool load(uint8_t *data, size_t len) const
bool save(const uint8_t *data, size_t len) const
const char * key
HostPreferences * get_preferences()
const void size_t len
Definition hal.h:68
esp32::ESP32PreferenceBackend PreferenceBackend
static void uint32_t