ESPHome 2026.4.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:
11 explicit HostPreferenceBackend(uint32_t key) : key_(key) {}
12
13 bool save(const uint8_t *data, size_t len);
14 bool load(uint8_t *data, size_t len);
15
16 protected:
18};
19
20class HostPreferences;
22
23} // namespace esphome::host
24
25namespace esphome {
26using PreferenceBackend = host::HostPreferenceBackend;
27} // namespace esphome
28
29#endif // USE_HOST
bool load(uint8_t *data, size_t len)
bool save(const uint8_t *data, size_t len)
HostPreferences * get_preferences()
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7
std::string size_t len
Definition helpers.h:1045
esp32::ESP32PreferenceBackend PreferenceBackend
static void uint32_t