|
ESPHome 2026.11.0-dev
|
Serializes flash updates. More...
#include <ota_backend.h>
Public Member Functions | |
| UpdateLock ()=default | |
| ~UpdateLock () | |
| UpdateLock (const UpdateLock &)=delete | |
| UpdateLock & | operator= (const UpdateLock &)=delete |
| bool | try_acquire () |
| Returns false if held elsewhere. | |
| void | release () |
| bool | is_held () const |
| void | hold_until_reboot () |
| Keep the lock set until reboot; is_held() becomes false. | |
Static Protected Member Functions | |
| static void | force_release () |
| Tests only. | |
Protected Attributes | |
| bool | held_ {false} |
Serializes flash updates.
Taken in begin(), released when the backend is destroyed, or kept until reboot after a successful end(). Also for components writing the update partition outside OTA.
Definition at line 101 of file ota_backend.h.
|
default |
|
inline |
Definition at line 104 of file ota_backend.h.
|
delete |
|
staticprotected |
Tests only.
Definition at line 89 of file ota_backend.cpp.
|
inline |
Keep the lock set until reboot; is_held() becomes false.
Definition at line 113 of file ota_backend.h.
|
inline |
Definition at line 111 of file ota_backend.h.
|
delete |
| void esphome::ota::UpdateLock::release | ( | ) |
Definition at line 82 of file ota_backend.cpp.
| bool esphome::ota::UpdateLock::try_acquire | ( | ) |
Returns false if held elsewhere.
Definition at line 76 of file ota_backend.cpp.
|
protected |
Definition at line 119 of file ota_backend.h.