ESPHome
2026.12.0-dev
Loading...
Searching...
No Matches
esphome
components
rp2
preference_backend.h
Go to the documentation of this file.
1
#pragma once
2
#ifdef USE_RP2
3
4
#include <cstddef>
5
#include <cstdint>
6
7
namespace
esphome::rp2
{
8
9
class
RP2PreferenceBackend
final {
10
public
:
11
bool
save
(
const
uint8_t *data,
size_t
len
);
12
bool
load
(uint8_t *data,
size_t
len
);
13
bool
sync
();
14
15
size_t
offset
= 0;
16
uint32_t
type
= 0;
17
};
18
19
class
RP2Preferences
;
20
RP2Preferences
*
get_preferences
();
21
22
}
// namespace esphome::rp2
23
24
namespace
esphome
{
25
using
PreferenceBackend
=
rp2::RP2PreferenceBackend
;
26
}
// namespace esphome
27
28
#endif
// USE_RP2
esphome::rp2::RP2PreferenceBackend
Definition
preference_backend.h:9
esphome::rp2::RP2PreferenceBackend::sync
bool sync()
Definition
preferences.cpp:135
esphome::rp2::RP2PreferenceBackend::load
bool load(uint8_t *data, size_t len)
Definition
preferences.cpp:58
esphome::rp2::RP2PreferenceBackend::save
bool save(const uint8_t *data, size_t len)
Definition
preferences.cpp:37
esphome::rp2::RP2PreferenceBackend::type
uint32_t type
Definition
preference_backend.h:16
esphome::rp2::RP2PreferenceBackend::offset
size_t offset
Definition
preference_backend.h:15
esphome::rp2::RP2Preferences
Definition
preferences.h:8
esphome::rp2
Definition
core.h:11
esphome::rp2::get_preferences
RP2Preferences * get_preferences()
Definition
preferences.cpp:137
esphome
Definition
a01nyub.cpp:7
esphome::len
const void size_t len
Definition
hal.h:68
uint32_t
static void uint32_t
Definition
crash_handler.cpp:179
esphome::PreferenceBackend
Definition
preference_backend.h:47
Generated by
1.12.0