ESPHome
2026.4.0-dev
Loading...
Searching...
No Matches
esphome
components
rp2040
preference_backend.h
Go to the documentation of this file.
1
#pragma once
2
#ifdef USE_RP2040
3
4
#include <cstddef>
5
#include <cstdint>
6
7
namespace
esphome::rp2040
{
8
9
class
RP2040PreferenceBackend
final {
10
public
:
11
bool
save
(
const
uint8_t *data,
size_t
len
);
12
bool
load
(uint8_t *data,
size_t
len
);
13
14
size_t
offset
= 0;
15
uint32_t
type
= 0;
16
};
17
18
class
RP2040Preferences
;
19
RP2040Preferences
*
get_preferences
();
20
21
}
// namespace esphome::rp2040
22
23
namespace
esphome
{
24
using
PreferenceBackend
=
rp2040::RP2040PreferenceBackend
;
25
}
// namespace esphome
26
27
#endif
// USE_RP2040
esphome::rp2040::RP2040PreferenceBackend
Definition
preference_backend.h:9
esphome::rp2040::RP2040PreferenceBackend::save
bool save(const uint8_t *data, size_t len)
Definition
preferences.cpp:40
esphome::rp2040::RP2040PreferenceBackend::load
bool load(uint8_t *data, size_t len)
Definition
preferences.cpp:61
esphome::rp2040::RP2040PreferenceBackend::type
uint32_t type
Definition
preference_backend.h:15
esphome::rp2040::RP2040PreferenceBackend::offset
size_t offset
Definition
preference_backend.h:14
esphome::rp2040::RP2040Preferences
Definition
preferences.h:8
esphome::rp2040
Definition
core.h:11
esphome::rp2040::get_preferences
RP2040Preferences * get_preferences()
Definition
preferences.cpp:138
esphome
Providing packet encoding functions for exchanging data with a remote host.
Definition
a01nyub.cpp:7
esphome::len
std::string size_t len
Definition
helpers.h:1045
uint32_t
static void uint32_t
Definition
crash_handler.cpp:141
esphome::PreferenceBackend
Definition
preference_backend.h:30
Generated by
1.12.0