|
ESPHome 2026.1.0-dev
|
OTA backend for ESP8266 using native SDK functions. More...
#include <ota_backend_esp8266.h>
Public Member Functions | |
| OTAResponseTypes | begin (size_t image_size) override |
| void | set_update_md5 (const char *md5) override |
| OTAResponseTypes | write (uint8_t *data, size_t len) override |
| OTAResponseTypes | end () override |
| void | abort () override |
| bool | supports_compression () override |
Public Member Functions inherited from esphome::ota::OTABackend | |
| virtual | ~OTABackend ()=default |
Protected Member Functions | |
| bool | erase_sector_if_needed_ () |
| Erase flash sector if current address is at sector boundary. | |
| bool | flash_write_ () |
| Write buffer to flash (does not update address or clear buffer) | |
| bool | write_buffer_ () |
| Write buffered data to flash and update MD5. | |
| bool | write_buffer_final_ () |
| Write buffered data to flash without MD5 update (for final padded write) | |
| bool | verify_end_ () |
| Verify the firmware header is valid. | |
| uint8_t | get_flash_chip_mode_ () |
| Get current flash chip mode from flash header. | |
Protected Attributes | |
| std::unique_ptr< uint8_t[]> | buffer_ |
| size_t | buffer_size_ {0} |
| size_t | buffer_len_ {0} |
| uint32_t | start_address_ {0} |
| uint32_t | current_address_ {0} |
| size_t | image_size_ {0} |
| md5::MD5Digest | md5_ {} |
| uint8_t | expected_md5_ [16] |
| bool | md5_set_ {false} |
OTA backend for ESP8266 using native SDK functions.
This implementation bypasses the Arduino Updater library to save ~228 bytes of RAM by not having a global Update object in .bss.
Definition at line 15 of file ota_backend_esp8266.h.
|
overridevirtual |
Implements esphome::ota::OTABackend.
Definition at line 303 of file ota_backend_esp8266.cpp.
|
overridevirtual |
Implements esphome::ota::OTABackend.
Definition at line 53 of file ota_backend_esp8266.cpp.
|
overridevirtual |
Implements esphome::ota::OTABackend.
Definition at line 239 of file ota_backend_esp8266.cpp.
|
protected |
Erase flash sector if current address is at sector boundary.
Definition at line 154 of file ota_backend_esp8266.cpp.
|
protected |
Write buffer to flash (does not update address or clear buffer)
Definition at line 167 of file ota_backend_esp8266.cpp.
|
protected |
Get current flash chip mode from flash header.
Definition at line 347 of file ota_backend_esp8266.cpp.
|
overridevirtual |
Implements esphome::ota::OTABackend.
Definition at line 125 of file ota_backend_esp8266.cpp.
|
inlineoverridevirtual |
Implements esphome::ota::OTABackend.
Definition at line 23 of file ota_backend_esp8266.h.
|
protected |
Verify the firmware header is valid.
Definition at line 310 of file ota_backend_esp8266.cpp.
|
overridevirtual |
Implements esphome::ota::OTABackend.
Definition at line 132 of file ota_backend_esp8266.cpp.
|
protected |
Write buffered data to flash and update MD5.
Definition at line 177 of file ota_backend_esp8266.cpp.
|
protected |
Write buffered data to flash without MD5 update (for final padded write)
Definition at line 223 of file ota_backend_esp8266.cpp.
|
protected |
Definition at line 44 of file ota_backend_esp8266.h.
|
protected |
Definition at line 46 of file ota_backend_esp8266.h.
|
protected |
Definition at line 45 of file ota_backend_esp8266.h.
|
protected |
Definition at line 49 of file ota_backend_esp8266.h.
|
protected |
Definition at line 53 of file ota_backend_esp8266.h.
|
protected |
Definition at line 50 of file ota_backend_esp8266.h.
|
protected |
Definition at line 52 of file ota_backend_esp8266.h.
|
protected |
Definition at line 54 of file ota_backend_esp8266.h.
|
protected |
Definition at line 48 of file ota_backend_esp8266.h.