ESPHome
2025.5.0
Loading...
Searching...
No Matches
esphome
components
ota
ota_backend.cpp
Go to the documentation of this file.
1
#include "
ota_backend.h
"
2
3
namespace
esphome
{
4
namespace
ota {
5
6
#ifdef USE_OTA_STATE_CALLBACK
7
OTAGlobalCallback
*
global_ota_callback
{
nullptr
};
// NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
8
9
OTAGlobalCallback
*
get_global_ota_callback
() {
10
if
(
global_ota_callback
==
nullptr
) {
11
global_ota_callback
=
new
OTAGlobalCallback
();
// NOLINT(cppcoreguidelines-owning-memory)
12
}
13
return
global_ota_callback
;
14
}
15
16
void
register_ota_platform
(
OTAComponent
*ota_caller) {
get_global_ota_callback
()->
register_ota
(ota_caller); }
17
#endif
18
19
}
// namespace ota
20
}
// namespace esphome
esphome::ota::OTAComponent
Definition
ota_backend.h:62
esphome::ota::OTAGlobalCallback
Definition
ota_backend.h:75
esphome::ota::OTAGlobalCallback::register_ota
void register_ota(OTAComponent *ota_caller)
Definition
ota_backend.h:77
esphome::ota::register_ota_platform
void register_ota_platform(OTAComponent *ota_caller)
Definition
ota_backend.cpp:16
esphome::ota::get_global_ota_callback
OTAGlobalCallback * get_global_ota_callback()
Definition
ota_backend.cpp:9
esphome::ota::global_ota_callback
OTAGlobalCallback * global_ota_callback
Definition
ota_backend.cpp:7
esphome
Providing packet encoding functions for exchanging data with a remote host.
Definition
a01nyub.cpp:7
ota_backend.h
Generated by
1.12.0